Home forums Using CanvasJS Incorrect label displayed for quarter of the year

This topic contains 7 replies, has 2 voices, and was last updated by  Indranil Deo 1 month, 4 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #16096

    Ravneet03
    Member

    Hi Team,
    I am trying to display a chart with label on X axis as Quarters of the year.
    https://jsfiddle.net/QwZuf/753/
    IN this the Q4’15 ends at 1Dec2015 instead it should end at 31Dec2015, similarly 1March16 and 31March16 should fall in Q1 16 but they fall in Q2’16.

    Please advise what can be done to resolve it.

    Thanks,
    Ravneet

    #16105

    Indranil Deo
    Member

    @ravneet03,

    You can use this workaround to generate axisLabels using stripLine.

    __________
    Indranil Deo,
    Team CanvasJS

    #16153

    Ravneet03
    Member

    Thanks Indranil. But there is a slight problem, my actual code does not contain axis array in the chart variable. It is something like this, chart.options.axisX . Inside the axisX there is stripLines array but I am not able to add in that array with the code you gave.

    If I try to do this: chart.options.axisX.stripLines[0] it creates another array inside stripLines array and hence I am not able to access its value using e.value.

    Also chart.options.axisX.addTo(“stripLines”,{..}); gives an error “addTo is not a function”.

    What can be done? Please suggest. Let me know if more information is required.

    Thanks

    #16154

    Ravneet03
    Member

    Never mind. It is working now!
    Thanks

    #16157

    Ravneet03
    Member

    Hi,

    I am trying to remove stripLine using remove() method, but it is not working. My canvasjs version is 1.8.0. Is it due to the old version?

    Thanks

    #17214

    Indranil Deo
    Member

    @ravneet03,

    Methods and Properties were introduced in v1.9.6, kindly refer this blog post for more info. Also please download latest version from our download page to use the latest features.

    __________
    Indranil Deo,
    Team CanvasJS

    • This reply was modified 2 months, 2 weeks ago by  Indranil Deo.
    #17326

    Ravneet03
    Member

    Team,
    Any update on permanent solution for this. I have used the workaround but the client using the application wants Quarter label to be displayed at the end of Quarter itself rather than repeating it for each month. Please update.

    Thanks,
    Ravneet Singh

    #17349

    Indranil Deo
    Member

    @ravneet03,

    This feature is not available as of now. Please take a look at this updated jsfiddle to display the label at the end of the Quarter.

    ___________
    Indranil Deo,
    Team CanvasJS

    • This reply was modified 1 month, 4 weeks ago by  Indranil Deo.
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.