Hi,
I have data that I need to present in a linechart. Some values are actual, and some are estimated. I have a DataSource column in my table that is set to 'A' for actual or 'E' for estumated.
I would like to use different shapes for data points on my chart depending on the value of DataSource. Could you please explain how to do this.
Thanks,
Helen.
Helen,
Have you been able to resolve your issues?
Michael S.
If you backtrack to my original response, you will see the only for each loop. That's where p is defined and that's where you should put the new code in my last post.
How did you add the point labels in the first place? I was assuming that you've added a chart text item at some point, but I can't tell without seeing your code. In any case, using vertical alignment won't help much in this case, but in order to access that property you need to get into the ChartText collection first.UltraChart1.LineChart.ChartText(0).VerticalAlign = StringAlignment.Far
Thanks Max,
The first one worked fine, but for the second one (position of the labels), I do not understand how to define "p" in your code sample. Besides, I can not find anything in LineChart.ChartText that has VerticalAlignment as an attribute.
Thank you for all your help.
The date interval can be adjusted this way, provided you are using actual dates and not strings:UltraChart1.Axis.X.TickmarkStyle = AxisTickStyle.DataIntervalUltraChart1.Axis.X.TickmarkInterval = 1UltraChart1.Axis.X.TickmarkIntervalType = AxisIntervalType.Days
If you need to extend the position of the label beyond what VerticalAlignment.Far on your ChartText items gives you (which isn't much), you can add this to your FillSceneGraph, inside the foreach loop:If TypeOf p Is Text And p.Path Is Nothing Then Dim label As Text = CType(p, Text) label.bounds.Y -= 10End If
Thanks a lot Max. It works perfectly well. I posted a snap shot of the graph.
I have two more questions though.
How can I make data point labels to be drawn a bit above the actual data points so that my shapes do not obscure the values?
How can I tell the graph that the minimum interval is one day? Otherwise it makes intevals half a day which results in redundant x-axis labels.
Thanks in advance for your help.