|
xyChart xAxis grid line density (verticle gridlines) |
Posted by icm63 on Jun-29-2013 03:11 |
|
This code sets the labels on the chart below
TickStep = CInt((Period.Length / AreaWidth) * 20)
mainXYChart.xAxis().setMultiFormat(Chart.StartOfMonthFilter(), "<*font=Arial,color=" & st.BorderTextColor.Replace("#", "") & "*>{value|mmm d}", _
Chart.StartOfDayFilter(1, 0.5), "<*font=Arial,color=" & st.BorderTextColor.Replace("#", "") & "*>{value|d}", TickStep)
mainXYChart.xAxis().setMultiFormat(Chart.AllPassFilter(), "-")
QUESTION: How do I get the vertical gridlines to marry up to labels above?
As you can see the gridlines draw for every data bar, and not just the label dates.
Any ideas?
|
Re: xyChart xAxis grid line density (verticle gridlines) |
Posted by Peter Kwan on Jul-01-2013 23:29 |
|
Hi icm63.
Your code configures everyday to have grid lines. There are major grid lines for days with labels, and minor grid lines for all other days. (The line mainXYChart.xAxis().setMultiFormat(Chart.AllPassFilter(), "-") configures minor grid lines for all other days.)
If you do not want grid lines for "all other days", there are two options:
(a) Do not configure minor grid lines for all other days. (Remove that line.)
(b) Set the minor grid line color to Chart.Transparent (eg. using PlotArea.setGridColor).
Hope this can help.
Regards
Peter Kwan |
|