I have a set of data that for each date, I have 2 pieces of numeric data. For example:
Date Value1 Value2
01/01/2008 10.5 2
02/01/2008 20.6 4
03/01/2008 30.7 6
04/01/2008 40.8 8
I am trying to represent this on a line chart where "Value1" is plotted against the Y-Axis and "Value2" is plotted against the Y2-Axis. I can create a set of NumericTimeSeries and add NumericTimeDataPoints using the date and the value in the "Value1" column. I then add these NumericTimeSeries to the chart's Series. The time series lines show up like expected.
I am also creating a different set of NumericTimeSeries with NumericTimeDataPoints using the same dates and the value from the "Value2" column.
How do I show this time series in the same chart so that "Value2" uses the Y2 axis instead of the Y axis that the "Value1" column is using?
You need to create a Composite chart with two LineChart layers, each one using a different Yaxis.
https://es.infragistics.com/samples/aspnet/chart/multiple-axes-in-composite-charts
I tried clicking on everything on that page but could not find a link to the example of how to do it. It only says that you can do it. It showed a picture of a chart with 4 Y-axes to the left. I was hoping to use the Y axis (on the left) for one set of data, and the Y2 axis (on the right) for the other set of data.
you can see the source code if you browse to it from here: http://samples.infragistics.com/2008.3/WebFeatureBrowser/Default.aspx
it's under webchart / composite charting / multiple Y axes.
if you just change the OrientationType of one of the AxisItem objects to Y2_Axis, that axis will appear on the right side of the chart.