jQuery UI Widgets Forums Chart Oddity with Chrome

This topic contains 2 replies, has 2 voices, and was last updated by  ToddHaddaway 7 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Oddity with Chrome #76716

    ToddHaddaway
    Participant

    So I’m trying to get the stacked column chart to work in Chrome and noticed something strange. If you take the same code at:

    SAMPLE HERE

    and replace the sample data with:

                        { Day: '2015/05', Running: 30, Swimming: 0, Cycling: 25 },
                        { Day: '2015/06', Running: 30, Swimming: 0, Cycling: 30 },
                        { Day: '2015/07', Running: 60, Swimming: 45, Cycling: 0 }
    

    it does not render in Chrome, yet it renders fine in Firefox and Safari.

    It has something to do with the Day labels. If I change them to this it renders fine.

                        { Day: '2015/May', Running: 30, Swimming: 0, Cycling: 25 },
                        { Day: '2015/June', Running: 30, Swimming: 0, Cycling: 30 },
                        { Day: '2015/July', Running: 60, Swimming: 45, Cycling: 0 }
    
    • This topic was modified 7 years, 1 month ago by  ToddHaddaway.
    Oddity with Chrome #76758

    Vladimir
    Participant

    Hello ToddHaddaway,

    It is not actually not rendering, it is causing a crash/unresponsive script and the reason is that all browsers have different capabilities regarding parsing dates from strings, and your date format is certainly ambiguous so the results vary in different browsers.

    You can use the xAxis { type: ‘basic’ } option to treat the values as strings and it will display them as they are, or you can specify a correctly formatted date and specify it is a type: ‘date’ with appropriate dateFormat and baseUnit, and format its output appropriately with the formatFunction option.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com

    • This reply was modified 7 years, 1 month ago by  Vladimir.
    Oddity with Chrome #76777

    ToddHaddaway
    Participant

    Ahhhh! I didn’t pick up on the ‘type’ abilities. Thanks. That makes a lot of sense.

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

You must be logged in to reply to this topic.