Hello,
I am trying to make a demonstration WinChart, but I am having some trouble getting the X-axis labels and tick marks to line up with the data. I have declared my axis formatting as follows:
UltraChart1.Axis.X.Labels.ItemFormatString = "<DATA_VALUE:MM/yyyy>"
UltraChart1.Axis.X.TickmarkInterval = 12 UltraChart1.Axis.X.TickmarkIntervalType = AxisIntervalType.Months Then I have the following data points: DataPointA As New DataPoint(Date.Parse("1/2010"), 5) DataPointB As New DataPoint(Date.Parse("3/2010"), 1) DataPointC As New DataPoint(Date.Parse("6/2010"), 10) DataPointD As New DataPoint(Date.Parse("9/2010"), 5) DataPointE As New DataPoint(Date.Parse("1/2011"), 1) Then I add the data points to a NumericTimeSeries and show it on the chart. However, my graph looks like the following. I have circled the problem. If I am thinking about this correctly, DataPointE should line up with the X-axis label and the tick mark line - but it does not. Is there a way to fix this? (The date parses out to 1/1/2011, so the point should fall directly on the 01/2011).
UltraChart1.Axis.X.TickmarkIntervalType = AxisIntervalType.Months
Then I have the following data points:
DataPointA As New DataPoint(Date.Parse("1/2010"), 5)
DataPointB As New DataPoint(Date.Parse("3/2010"), 1)
DataPointC As New DataPoint(Date.Parse("6/2010"), 10)
DataPointD As New DataPoint(Date.Parse("9/2010"), 5)
DataPointE As New DataPoint(Date.Parse("1/2011"), 1)
Then I add the data points to a NumericTimeSeries and show it on the chart. However, my graph looks like the following. I have circled the problem. If I am thinking about this correctly, DataPointE should line up with the X-axis label and the tick mark line - but it does not. Is there a way to fix this? (The date parses out to 1/1/2011, so the point should fall directly on the 01/2011).
Hello Maevyn,
If I understood well your scenario, maybe you are looking for the property :
axisX.TimeAxisStyle.TimeAxisStyle = RulerGenre.Discrete;
I try to reproduce your scenario in a small sample. Please take a look at the attached sample and if you think that I misunderstood your scenario, feel free to modify my sample. If you have any questions, do not hesitate to write me
Regards