Hi,
Is it possible to have a time series X axis data for column chart?
I want to display a time range along the X axis. Each period in the X axis is at month intervals. For each month, I want a column to display the total of something for that month. At present, the chart displays the correct values on the X axis and Y axis but I am not seeing any columns in it (see screen shot)
I am creating a NumericTimeSeries to bind my data table to. I'm setting the ValueColumn and the TimeValueColumn to the columns in the DataTable. If I change my series type to a Spline, I will get the line plotted. It just won't do anything for the Column (or BarChart).
I'm also plotting a Spline from the same DataTable using data values in a different column. Again, the values will be plotted at monthly intervals on the X axis. The Spline in this instance is drawn fine.
Is this possible? I've got latest service release. I'm guessing it may only work with labels on Column charts. Any help is much appreciated.
Andez
If I create the X Axis with as a string axis and create a NumericSeries for my column data (in a DataTable), then the columns get drawn. I am binding the data to this series and setting the LabelColumn and ValueColumn accordingly. This series is using the Y Axis to plot the column values.
When I do this the Spline does not get drawn.
The Spline data in my DataTable is bound to a NumericSeries as per the column data. This series is also using the X and Y Axis.
The only way I got this working was to use the X2 Axis for my Spline chart area and the Y Axis. Is this the only way to do it?
Also, referring to the help for creating the composite charts:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/Chart_Creating_a_Composite_Chart_in_Code_Part_2_of_2.html
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/Chart_Creating_a_Composite_Chart_in_Code_Part_1_of_2.html
I've noticed the points on the line do not match exactly to the points in the column. The same in my chart and the examples above.
Is there a way around this?
Excellent thanks Max.
I've set my margins as follows:
Dim cla2 As New ChartLayerAppearance()cla2.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.SplineChart...cla2.AxisX.Margin.Near.MarginType = UltraChart.Shared.Styles.LocationType.Percentagecla2.AxisX.Margin.Near.Value = 2cla2.AxisX.Margin.Far.MarginType = UltraChart.Shared.Styles.LocationType.Percentagecla2.AxisX.Margin.Far.Value = 2
The points are now bang in the middle of the columns.
Column charts can only use a string x-axis. Any date time value that you want to plot for the column chart has to be converted to a string. It also won't be a true date time scale, because columns have to be equally spaced. The spline charts can use a time axis or a string axis, but cannot use the same axis you defined for your column chart. This is because when using column charts, axis.SetLabelAxisType is set to GroupBySeries, while with spline charts it's set to ContinuousData or DateData. However, since you can create an unlimited number of axes in a composite chart, this isn't a problem. It just means that you can't share the same axis sometimes. They don't even have to be on opposing sides of the chart; you can have n number of X2 axes, and so on. So, in your case, you can create 2 different X axes and use one for column layer and one for spline layer.
As for getting spline points to align with column centers, you can use the margin property on the spline layer's axis and set Near and Far margins to something like 3%. This is something you'll have to try a couple of times to get the right alignment.