I've got data that is formatted in a table as follows, and am displaying it in a Scatter Chart in WinChart version 7.3.20073.38:
Date (Text), Index (Integer), Value (Double) 2007-01-20, 1, 182708.213068332 2007-04-20, 2, 191849.206636247 2007-07-19, 3, 181909.247938635 2007-10-17, 4, 193106.239361725 2008-01-15, 5, 186136.687476901 2008-04-14, 6, 181598.738009246 2008-07-13, 7, 182911.470058264 2008-10-11, 8, 180885.534667417
The scatter chart is using the second column (Index) for the X Axis, and the third column (Value) for the Y Axis. The index column is used for the X axis so that I may use custom code to calculate and graph the best-fit polynomial on the chart. The first column is a text column, not a date column, representing the date that the value was taken.
I'm getting a chart as shown in the attached screen shot, but I would like the X axis labels to use the first text field in each row, instead of the second field. I've tried setting the X Axis label's ItemFormat to <ITEM_LABEL>, but this only results in the X Axis being labeled with a bunch of literal "<ITEM_LABEL>" strings.
How would I go about having the text fields show up as X Axis labels?
You are looking at a IRenderLabel implementation. Take a look at the "Custom Labels" section in my chart blog post:
http://blogs.infragistics.com/blogs/skim/archive/2008/09/05/chart-university-chart-101-and-some-201-301-401-stuff.aspx
Here's the new link to the above blog post, for anyone else looking for it:
http://blogs.infragistics.com/blogs/sung_kim/archive/2008/09/05/chart-university-chart-101-and-some-201-301-401-stuff.aspx
Hi, I have an issue that I cannot resolve. I followed the process on that blog but for some reason, the X Axis label will only change if i hover on the scatter plot. Also, the X axis label changes according to the data of the hovered plot.
This is the code that i used. I also used the data that u post above this email chain. Thanks.
NLDChart.Axis.X.Labels.ItemFormat = AxisItemLabelFormat.Custom
"<DATA_VALUE:#>"
Regards,
Bobby Pohan
bpohan said:I followed the process on that blog but for some reason, the X Axis label will only change if i hover on the scatter plot
This part makes me think that you are talking about tooltips and not the x axis labels. Are you saying the axis labels toggle back and forth depending on whether you are above the data point.
bpohan said:Also, the X axis label changes according to the data of the hovered plot.
The labels are dependant on the data. If this is a scatter chart then the x and y axis will both be numeric. By default, our axis will dynamically change the range based on the range of data. If you want it to be static, you have to look at the "Custom Axis Range" section of the blog post.
If this doesn't answer you question. Could you be specific on what you are trying to do?