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?
Thanks, I tested, it worked by showing the correct X axis label. But, when I click the button to run the
ultraChart1.Axis.X.Labels.ItemFormat = Infragistics.UltraChart.Shared.Styles.AxisItemLabelFormat.ItemLabel;
I received the attach result. The X axis are only ITEM_LABEL. Any suggestion?
You want to toggle between
ultraChart1.Axis.X.Labels.ItemFormat = Infragistics.UltraChart.Shared.Styles.AxisItemLabelFormat.DataValue;
Thanks for the quick response. What I want to do is to be able to change the X Axis label by lets just say, clicking a button. So, if this is the data that i use:
dt.Columns.Add("Month", typeof(string));
dt.Columns.Add("Leads", typeof(int));
dt.Columns.Add("Sales", typeof(int));
dt.Rows.Add("January", 120, 50);
dt.Rows.Add("February", 90, 44);
dt.Rows.Add("March", 70, 22);
dt.Rows.Add("April", 66, 21);
dt.Rows.Add("May", 80, 42);
dt.Rows.Add("June", 85, 48);
by default, i want to show the X axis label as the second column (i.e. 120, 90, 70, etc.). Then, by clicking the button, I want to change the X axis label to
January, February, etc. from the 1st column in my scatter plot graph. Is this possible? Like i said previously,
I used :
NLDChart.Axis.X.Labels.ItemFormat = AxisItemLabelFormat.Custom
NLDChart.Axis.X.Labels.ItemFormatString =
"<SERIES_LABEL:#>"
But, the label on the X axis' ticks changes based on what data plot that I hover. Again, I appreciate your help.
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?
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.
"<DATA_VALUE:#>"
Regards,