jQWidgets Forums

jQuery UI Widgets Forums Chart Scatter plot grouped by x-axis value

This topic contains 7 replies, has 2 voices, and was last updated by  ivailo 9 years, 9 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • Scatter plot grouped by x-axis value #73659

    ziggy
    Participant

    Hi,

    I have my sample data :

     var sampleData = [
                        { Date: 'July 8', AVG_CV: 34, AVG_MV: 99, AVG_YV: 199 },
                        { Date: 'July 8', AVG_CV: -200, AVG_MV: 169, AVG_YV: 77},
                        { Date: 'July 8', AVG_CV: 67, AVG_MV: 275, AVG_YV: 69},
                        { Date: 'July 6', AVG_CV: 99, AVG_MV: 130, AVG_YV: 6},
                        { Date: 'July 6', AVG_CV: 200, AVG_MV: 11, AVG_YV: 23},
                        { Date: 'July 9', AVG_CV: 150, AVG_MV: 0, AVG_YV: 31},
                        { Date: 'July 9', AVG_CV: 45, AVG_MV: 89, AVG_YV: 22}]

    and I want to scatter plot by Date. I tried doing a scatter plot but I get a different column per date. I would want it to be grouped by Date.

    Is this possible?

    Thanks!

    Karen

    Scatter plot grouped by x-axis value #73664

    ziggy
    Participant

    …or can we plot a source like this:

    var sampleData2 = [
                     
                        { Date: 'July 8',  "AVG_CV": [34, 100, -170], "AVG_MV": [66, 44, -230], "AVG_YV": [199, 0,-2,-20] },
                        { Date: 'July 9',  "AVG_CV": [34, 100, -170], "AVG_MV": [66, 44, -230], "AVG_YV": [199, 0,-2,-20] },
                        { Date: 'July 10',  "AVG_CV": [34, 100, -170], "AVG_MV": [66, 44, -230], "AVG_YV": [199, 0,-2,-20] }
                    ];
    Scatter plot grouped by x-axis value #73665

    ivailo
    Participant

    Hi Karen,

    Here is a chart with your values.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    Scatter plot grouped by x-axis value #73666

    ziggy
    Participant

    Hi ivailo,

    Yes I got that chart, however, I wanted to group the x-axis by Date. Is it possible?

    Scatter plot grouped by x-axis value #73685

    ziggy
    Participant

    Hi Ivailo,

    Can we plot these data type of source structure in a scatter plot?

    var sampleData2 = [
                     
                        { Date: 'July 8',  "AVG_CV": [34, 100, -170], "AVG_MV": [66, 44, -230], "AVG_YV": [199, 0,-2,-20] },
                        { Date: 'July 9',  "AVG_CV": [34, 100, -170], "AVG_MV": [66, 44, -230], "AVG_YV": [199, 0,-2,-20] },
                        { Date: 'July 10',  "AVG_CV": [34, 100, -170], "AVG_MV": [66, 44, -230], "AVG_YV": [199, 0,-2,-20] }
                    ];
    Scatter plot grouped by x-axis value #73687

    ivailo
    Participant

    Hi Karen,

    There is no option to manipulate the data in your way.
    Try to reorganize it to be compatible with the regular chart.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    Scatter plot grouped by x-axis value #73689

    ziggy
    Participant

    Any suggestions on how to structure the data to fit to your regular scatter chart?

    Scatter plot grouped by x-axis value #73694

    ivailo
    Participant

    Hi Karen,

    You can add more info about Date in your first sampleData example.

     var sampleData = [
                        { Date: 'July 8 1:30PM', AVG_CV: 34, AVG_MV: 99, AVG_YV: 199 },
                        { Date: 'July 8 5:30PM', AVG_CV: -200, AVG_MV: 169, AVG_YV: 77},
                        { Date: 'July 8 7:30PM', AVG_CV: 67, AVG_MV: 275, AVG_YV: 69},
                        { Date: 'July 6 1:30PM', AVG_CV: 99, AVG_MV: 130, AVG_YV: 6},
                        { Date: 'July 6 5:30PM', AVG_CV: 200, AVG_MV: 11, AVG_YV: 23},
                        { Date: 'July 9 1:30PM', AVG_CV: 150, AVG_MV: 0, AVG_YV: 31},
                        { Date: 'July 9 5:30PM', AVG_CV: 45, AVG_MV: 89, AVG_YV: 22}]

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.