Hi ,
I am assigning a datasource to the ultrachart which includes column AvailDate (Date Time) , AdjustedQty,Qty and Source .
I want to map Source on Y axis and Avail Date on X axis .Currently AdjustedQty,Qty are on x axis and Source is on Y axis.
How can i inculde AvailDate on X axis.
I tried using NumericSeried , but its not working :
NumericSeries series = new NumericSeries(); series.Data.DataSource = _AvailGrid.DataSource; series.Data.LabelColumn = "Source"; series.Data.ValueColumn = "AvailDate"; series.DataBind(); avialHistoryChart.Series.Add(series); avialHistoryChart.DataMember = "Source"; avialHistoryChart.Data.DataBind();
Am i doing something wrong here ....can somebody pls suggest the work around for this.
thanks,
ashish
Something doesn't add up here. NumericTimeSeries doesn't really work for column charts and it's you're using a ColumnChart (not BarChart) the y axis will always display numbers and not time. Can you post a sample project here along with a screenshot?
The reason you can't plot column charts on numeric/time X axis scale is because columns are designed to display categories along the x axis. Categories can't have a numeric scale as they represent distinct objects, whose values are being compared (like countries or products). Also, let's assume for a moment that you could plot columns on a date time scale. What would happen if I plot 2 values on 1/1/2000 and one value on 12/31/2010? You'll get two overlapping columns in the beginning and a whole bunch of empty space in the middle.
If you want to learn more about the charts, I suggest looking at the samples and help docs: https://ko.infragistics.com/samples/windows-forms/chart/overview (look for WebCharts towards the bottom)
http://help.infragistics.com/NetAdvantage/ASPNET/2010.3/CLR4.0?page=Web_WebChart.html
Hi,Thanks for the reply.
I used NumericTimeSeries and it worked .....but datetime was coming on y axis.
My requirement was for showing date time on x axis with column chart. I converted the date time to string and managed to show on the graph...but wondering is there any better way of representing .....i mean if i am using infragistics chart i shouldnt have needed to do the manipulation of data.
Is there any sample application where i can learn the stuff with chart?
You should use Source column as ValueColumn and AvailDate as LabelColumn. It appears that you have them switched. The numeric values appear on the Y axis, which is referenced by the ValueColumn. The X axis shows labels, which in your case are dates, so that will be the LabelColumn.