jQuery UI Widgets Forums Chart Multiple data sources

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Multiple data sources #69516

    baykouch
    Participant

    Hi jqWidgets team,

    as newbie in your amazing library I was looking at the chart examples and realized that all multiple serie’s data was aligned on the x-axis values and according to the API each serie is referenced by the name of the value property of the chart’s data source.

    But how can we display the following two independent data rows in a line chart?

    s1_data: [{time: 1-4-2015, val1: 10}, {time: 3-4-2015, val1: 20}, {time: 4-4-2015, val1: 30}]
    s2_data: [{time: 2-4-2015, val2: 15}, {time: 4-4-2015, val2: 25}, {time: 5-4-2015, val2: 35}]

    x-axis will have points at 1st, 2nd, 3rd, 4th and 5th of April, but the series s1 and s2 has a value at only few of this points.

    How to configure the data source and the series of a line chart, to display proper the two rows?
    Can you provide me some example code?

    Many thanks in advance!

    Best regards,
    Anton

    Multiple data sources #69520

    Dimitar
    Participant

    Hi Anton,

    You would have to combine the two rows in a single array to be able to load a jqxChart from them (the chart can only be bound to a single data source). As for handling missing data points, please refer to the following demo: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxchart/javascript_chart_missing_points_line_series.htm?arctic.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Multiple data sources #69682

    baykouch
    Participant

    Hi Dimitar,

    Thank you for the hint. Putting both data sources in the records field of a single dataAdapter works fine for me!

    Best regards,
    Anton

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

You must be logged in to reply to this topic.