I'm trying to get the tick intervals and either major or minor grid lines to deal with both small and large data sets. The issue I have is that when a large dataset is supplied the x-axis label simply does not display any labels, unless I use the scroll feature to drill to a more accurate level, in which case I get 1 for every data interval!. Also, with large datasets the x-axis simply draws for every tick meaning I get a grey blur. What I'm aiming for should be very simply. I want only say, 10 x-axis lines displayed at any 1 time and, at the same time, only 10 labels to be displayed. So, dataset with less than 10 items shows all labels when increasing some labels are omitted.I've tried almost every combination of the x-axis settings and I can't get this to work. Can you please provide me with the settings.
Can anyone provide the code for this?
Thanks!
Dear Aim123:
I hope someone replies to you. I'm having the same issue. I'm trying to display a CandleChart graph, where dates should display at the bottom. It least they do in designer mode.
However, when I run the application, the CandleChart does not display these dates. There seems to be nothing in the helps or samples which deal with this issue.
I would appreciate if anyone has an answer, if they would answer you promptly.
Sincerely,
Burton G. Wilkins, Developer.
P.S: Is this a known bug?
This is still an issue and I'm not alone. Could someone please indicate if this is possible and if so, what are the settings.
Thanks
Sorry for the delayed response. There's a property that is specific to the candle charts called SkipN. You can use this property to skip labels on the x axis.
myChart.CandleChart.SkipN = 10 //will display every 10th label
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Infragistics2.Win.UltraWinChart.v8.2~Infragistics.UltraChart.Resources.Appearance.CandleChartAppearance_members.html
Thanks for the reply but I'm not using a candle chart. The issue I have is with a line chart, How would i accomplish my origional request?
Here's an example of using FillSceneGraph to add a vertical line using axis values. The thing to keep in mind is the axis type when mapping values onto an axis. For string axes, such as the line chart's x axis, values represent column/row index. For numeric axes, values represent actual data values.
void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e){ IAdvanceAxis xAxis = e.Grid["X"] as IAdvanceAxis; IAdvanceAxis yAxis = e.Grid["Y"] as IAdvanceAxis; if (xAxis != null && yAxis != null) { Line line = new Line(); line.p1 = new Point((int)xAxis.Map(1), (int)yAxis.MapMinimum); line.p2 = new Point((int)xAxis.Map(1), (int)yAxis.MapMaximum); line.PE.Stroke = Color.Red; e.SceneGraph.Add(line); }}
Worked a treat. Thanks!
However, regarding drawing your own lines using fillSceneGraph how do you get your custom lines to be drawn in line wth the datavalues? i.e. 0.0 could appear anywhere depending on the supplied data.If I always wanted a line to be drawn along this point could I identify the co-ordinates somehow?
I know I could simply place a value in the dataset to accomplish this and set style with chart.override etc.. but I was just wondering if this is possible.
For line chart try setting the following properties:
ultraChart1.Axis.X.TickmarkInterval = 10;ultraChart1.Axis.X.TickmarkStyle =
AxisTickStyle.DataInterval;
This will display every tenth label. The gridlines, however, will not be affected by this. You can turn the gridlines off completely for large sets of data or use FillSceneGraph event to either draw a set of vertical lines to represent the gridlines or remove some of the existing ones.