Hi All,
I 've downloaded v1.0.13 and implemented the MinorTicks. It looks great. Now what I want to know is that,
1) can we differentiate the color of the Ticks and MinorTicks differently.
I cant see any method to color/paint the MinorTicks seperately. It comes with Red color by default.
2) Can we set the rangeAxis.setMinorTickMarkInsideLength(float); -> to the height of the chart? instead by giving some hardcoded value? and how?
Any help would be appreciated.
Thanks
Surendran.
Gantt chart Minor ticks
-
- Posts: 17
- Joined: Mon Oct 26, 2009 12:07 pm
- antibot: No, of course not.
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Gantt chart Minor ticks
No, at present there is no separate "minorTickMarkPaint"/"minorTickMarkStroke" property, but it should´t be too hard to implement.nsurendiran wrote: 1) can we differentiate the color of the Ticks and MinorTicks differently.
If the axis is a domain axis of an XYPlot, callnsurendiran wrote: 2) Can we set the rangeAxis.setMinorTickMarkInsideLength(float); -> to the height of the chart? instead by giving some hardcoded value? and how?
Code: Select all
plot.setDomainMinorGridlinesVisible(true);
Note that the paint/stroke for the minor grid lines can be selected independently of the paint/stroke for the (major) grid lines.
-
- Posts: 17
- Joined: Mon Oct 26, 2009 12:07 pm
- antibot: No, of course not.
Re: Gantt chart Minor ticks
Hi,
Thanks for the reply. I have done the differentiating colors between the Minor and Major Ticks by the following code.
the code which you suggested
plot.setDomainMinorGridlinesVisible(true);
is for the horizontal line. Coloring issue is resolved now for me with the above code I placed.
Still I have the height of the Minor ticks to be adjusted to the height of the chart.
Any suggestions?
Thanks for the reply. I have done the differentiating colors between the Minor and Major Ticks by the following code.
Code: Select all
CategoryPlot plot = chart.getCategoryPlot();
plot.setRangeGridlinesVisible(true);
plot.setRangeGridlinePaint(Color.BLUE); //Range Line Vertical Major Tick
plot.setRangeGridlineStroke(new BasicStroke(1)); //width of Major Tick
DateAxis rangeAxis = (DateAxis) plot.getRangeAxis();
rangeAxis.setTickMarkPaint(Color.PINK); // color of the Minor Tick
plot.setDomainMinorGridlinesVisible(true);
is for the horizontal line. Coloring issue is resolved now for me with the above code I placed.
Still I have the height of the Minor ticks to be adjusted to the height of the chart.
Any suggestions?
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Gantt chart Minor ticks
Sorry, I didn´t see the "Gantt chart" in your thread title.
In that case we are dealing with a CategoryPlot. The range axis of CategoryPlot is a ValueAxis, and to show the minor grid lines, you would have to call

In that case we are dealing with a CategoryPlot. The range axis of CategoryPlot is a ValueAxis, and to show the minor grid lines, you would have to call
I am not sure whether it is that what you mean by "adjusting the minor ticks to the height of the chart" but it should be quite close.plot.setRangeMinorGridlinesVisible(true)
-
- Posts: 17
- Joined: Mon Oct 26, 2009 12:07 pm
- antibot: No, of course not.
Re: Gantt chart Minor ticks
Hi Thanks again for the reply.
Yes, this is the one I am looking for. And its working now
But I did a workaround and solved my problem , say if my chart height is 700, I have to set the minorGridlines height to 600, and it was working.
Anyway Now I need not worried about the calculations. Thanks dude 
PS: Could any one please tell me how can I upload an screenshot of my application? I already read that in the forum rules..
But I dont have any shared server, and its not accessbile via internet. So Is that possible for me to upload from my desktop?
Suren
Yes, this is the one I am looking for. And its working now
But I did a workaround and solved my problem , say if my chart height is 700, I have to set the minorGridlines height to 600, and it was working.
Code: Select all
DateAxis rangeAxis = (DateAxis) plot.getRangeAxis();
rangeAxis.setMinorTickCount(4);
rangeAxis.setMinorTickMarksVisible(true);
rangeAxis.setMinorTickMarkInsideLength(700.0f); //height of the minor ticks
rangeAxis.setMinorTickMarkOutsideLength(0f);

PS: Could any one please tell me how can I upload an screenshot of my application? I already read that in the forum rules..
But I dont have any shared server, and its not accessbile via internet. So Is that possible for me to upload from my desktop?
Suren