Chart with more than one dataset?

Posted by: richard on 21 September 2021, 3:38 am EST

    • Post Options:
    • Link

    Posted 21 September 2021, 3:38 am EST

    Is it possible to use more than one dataset for a chart? I am trying to figure out if is possible to use my existing application data for a chart in a report but have not been able to figure it out when all of the data is not contained within a single dataset. I am able to get this to work if I reformat my data into a single dataset for each chart but that is much more verbose so I am trying to avoid that if possible.

    Example Data 1 (1 array of labels, 1 array of values):

    {

    “results”: {

    “labels”: [“one”, “two”, “three”],

    “values”: [10, 20, 30]

    }

    }

    Example Data 2: (1 array of labels, 1 array of objects)

    {

    “results”: {

    labels: [“one”, “two”, “three”],

    items: [

    {

    “description”: “Item 1”,

    “values”: [10, 20, 30]

    },

    {

    “description”: “Item 2”,

    “values”: [13, 23, 33]

    },

    {

    “description”: “Item 3”,

    “values”: [16, 26, 36]

    }

    ]

    }

    }

  • Posted 21 September 2021, 7:10 pm EST

    Hello, Richard,

    Charts can only be bound to a single data set, this is a common rule for all the data regions.

    The only way to bind to multiple datasets is to combine them into a single one.

  • Posted 22 September 2021, 12:11 am EST

    OK, thanks. I saw on the roadmap for 3.0 that you have Data Set relationships. Do you know if that would allow me to combine/relate these Data Sets so that I can use them as if they were a single data set without changing my source data?

  • Posted 22 September 2021, 1:00 am EST

    I don’t think that data set relationships would help in this scenario. The only way is by combining data sets. But you can use mock data sets at design time and supply the actual data at runtime by combining datasets in the code of the application. https://www.grapecity.com/activereportsjs/docs/ReportAuthorGuide/Databinding#runtime-data-binding

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels