Hi,
I want to build a Line chart to compare two different values during a time period say comparing cost with number of peope present. This means I will have two time series data (one with people cound and date time and the other with cost with datetime) which comes from two different sources. I want to combine them into same datachart with two series.
Suppose I have the data set like below which has a key value pair one with date time and the other as value
Cost = [<00:00, 10>,<01:00, 20>,<02:00, 10>,<03:00, 14>,<04:00, 10>,<05:00, 39>,<06:00, 1>] People = [<00:09, 1123>,<01:09, 124>,<08:12, 10>,<09:00, 19>,<10:09, 13>,<11:00, 39>,<12:00, 1>,<13:15, 394>,<15:00, 349>,<16:03, 39>,<23:00, 39>]
How would I represnt these two data by two line series in a same data chart?
Thanks
I have a new sample for you with two data sources, one for the people and one for the costs.
You'll see in the sample that there are two CategoryXAxis, two NumericYAxis and two LineSeries.
The NumericYAxis allow me to position the axis labels on the opposite sides of the chart.
The CategoryXAxis and their LineSeries are bound to their individual data sources so that you two lines representing the separate collections.
Please let me know if you have any questions.
Yes, that is true. I am using two different data sources. This is because they both come from different services which needs to be displayed in the same chart. For example, if I query the service for an hourly data, the service would give me the data of each hour but at different start times. That means, if cost data is available at intervals 01:00, 02:00... and so on then the People data could have times 01:12,02:12,...and so on. and also some of the values are missing in some cases which makes it difficult to combine those two data sets. So, I was wondering if infragistics has some built in functionality that could handle such situation??
Looking into your inquiry, it appears that you believe that you need to use two separate data sources. However it seems more likely that you would use one datasource that contains all of the values (date, cost and number of people).
From your description of the value pairs, I would assume that the cost and number of people are related based on a timestamp value. So you could have a datetime value with a cost and a number of people present.
Then you would have one two numeric series and one shared CategoryXAxis related to the dateTime value.
I’ve created a sample that demonstrates my suggestion.
Please let me know if this is helpful to you.