0

I am using Shield UI Chart where I have a chart with bars and some data.

            dataSeries: [
                {
                    seriesType: 'bar',
                    collectionAlias:'Total Visits',
                    data: [565000, 630400, 743000, 910200, 1170200, 1383000]
                },
                {
                    seriesType: 'bar',
                    collectionAlias: 'Unique Visits',
                    data: [152000, 234000, 123000, 348000, 167000, 283000]
                }
            ]

The chart is woring fine, however when I try to use same data for range bar, there is nothing shown. Why is that? What could be the problem, since there are other chart types, where I just change the type and the data is displayed?

            dataSeries: [
                {
                    seriesType: 'rangebar',
                    collectionAlias:'Total Visits',
                    data: [565000, 630400, 743000, 910200, 1170200, 1383000]
                },
                {
                    seriesType: 'rangebar',
                    collectionAlias: 'Unique Visits',
                    data: [152000, 234000, 123000, 348000, 167000, 283000]
                }
            ]

1 Answers1

1

There is the possibility to just change the chart type and to have the data displayed in the now layout. However you need to consider where the data types are compatible or not. Bar charts are intended to show single values e.g. 1,2,3,4 and so on. While the range bar's data values come in pairs. Look at the code below:

{
 seriesType: 'rangebar',
 data: [[0.75, 0.79], [0.95, 1.03], [0.70, 0.79], [0.65, 0.70], [0.5, 0.69], [0.77, 0.89], [0.79, 0.87], [0.55, 0.89], [0.65, 0.99]]
} 
Ed Jankowski
  • 449
  • 1
  • 3
  • 5