Home Forums Chart Support Start month is not displayed on X-Axis in Stacked Area graph

Start month is not displayed on X-Axis in Stacked Area graph

Viewing 4 posts - 1 through 4 (of 4 total)
  • #27731

    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/

    #27732

    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.

    #27770

    @gopi-nethi,

    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

    Sorry, it’s not possible to control the starting point of label, as of now.

    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.

    You can use unicode to display quotes in legend text as shown in this JSFiddle.

    —-
    Manoj Mohan
    Team CanvasJS

    #38327

    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.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.