You must be logged in to post your query.
Home › Forums › Chart Support › Start month is not displayed on X-Axis in Stacked Area graph
Tagged: Start month is not displayed on X-Axis
We are trying to show month-wise data in the Stacked Area graph. Months are displayed on the x-axis and data is displayed on the y-axis. But the start month is not displayed on the x-axis. Our requirement is Start Month should be displayed at start of the x-axis. Can you please suggest how to do that. For referece, see the jsfiddle link with example code
https://jsfiddle.net/t83z4bvn/
Additionally, double quotes are not displayed on legends. I have given the legends data as below name: “Inventory within \”Do Not Use\” period”. My expectation is Do Not Use should be in quotes. But no quotes are displayed.
@gopi-nethi,
Sorry, it’s not possible to control the starting point of label, as of now.
You can use unicode to display quotes in legend text as shown in this JSFiddle.
—- Manoj Mohan Team CanvasJS
OK a good solution for this that I found was easy using PhP is to subtract one (1) from the months as you scale them.
EG:
dataPoints: [ @foreach($dataline as $data) { y: {{$data->totals}}, x: new Date({{$$data->year}},{{$data->month – 1}}) }, @endforeach ] }]
This will allow it to put January in first place or what ever month order you have the “COLLECTION” in.
You must be logged in to reply to this topic. Login/Register