Hello Everyone ,
you can look fig 1 and fig 2 from that picture the graph look same for both but i want that graph label in only "dd" format of date i don't want to show month but if i used "dd" the label give 2.5,5,7.5 instead of 1,2,3 and so on i want that that graph as per the fig 1 (as 31 step ) but only in "dd" format of date
Kindly suggest if you have any solution.
Kilian Hekhuis wrote:
@Benjith: I think for this you can get away with using format instead of formatter with a function? Something like:
format: {value:%e}
(per this)?
Thank you @Kilian for mentioning the better approach
See this Sample - LineChartDemo
HigghCharsJSON Value
" xAxis: { type: 'datetime', title: { text: 'Date Range' }, labels: { format: '{value:%d}', rotation: 45, align: 'left' } }"
Regards,
Benjith Sam
Hi Akshay,
You need the Label to be a Date, because the Platform can dan instruct Highcharts (the underlying component) to use a date/time axis, instead of a discrete one. In order to format the labels, check the Highcharts documentation. One thing to look out for is the xAxis.labels.format, or for more complex stuff the formatter, which allows you to control the formatting in detail.
Add these options to the AdvancedFormat property of the chart, using the XAxisJSON parameter of AdvanceFormat_Init.
Kilian Hekhuis wrote: hi killan hekhuis ,
thank you for your quick response but i am unable to find the proper output with this solution
As per the mentioned requirement, you will have to set the LineChart widget, HigghCharsJSON property with the below mentioned xAxis Object definition
" xAxis: { type: 'datetime', title: { text: 'Date Range' }, labels: { formatter: function() { return Highcharts.dateFormat('%e', this.value); } } }"
Hope this helps you!
Benjith Sam wrote:
Thank you for your quick response but still i m not get the proper output for this .. i applied that to high charsjson but got that output which is not completed my requirement
Akshay Deshpande wrote:hi Benjith sam,
sorry that was my mistake i put type to date instead of datetime , so that why i got incorrect graph
for now it is full fill my requirement.
Please share your module so we can take a look what you did.