I made a dial chart Using JFreeChart. I was wondering if it was possible to make the indicators thicker. The code I am using to make them now are:
StandardDialRange standarddialrange;
StandardDialRange standarddialrange2;
StandardDialRange standarddialrange3;
if(isPercentageIV==true){
standarddialrange = new StandardDialRange(90D, 100D, Color.GREEN);
standarddialrange2 = new StandardDialRange(60D, 90D, Color.orange);
standarddialrange3 = new StandardDialRange(0D, 60D, Color.RED);
}
else{
standarddialrange = new StandardDialRange(.9*goal*dialScale, goal*dialScale, Color.GREEN);
standarddialrange2 = new StandardDialRange(.6*goal*dialScale, .9*goal*dialScale, Color.orange);
standarddialrange3 = new StandardDialRange(0, .6*goal*dialScale, Color.RED);
}
// Sets the scale/radius of all the indicators.
standarddialrange.setScaleIndex(0);
standarddialrange.setInnerRadius(0.58999999999999997D);
standarddialrange.setOuterRadius(0.58999999999999997D);
dialplot.addLayer(standarddialrange);
standarddialrange2.setScaleIndex(0);
standarddialrange2.setInnerRadius(0.58999999999999997D);
standarddialrange2.setOuterRadius(0.58999999999999997D);
dialplot.addLayer(standarddialrange2);
standarddialrange3.setScaleIndex(0);
standarddialrange3.setInnerRadius(0.58999999999999997D);
standarddialrange3.setOuterRadius(0.58999999999999997D);
dialplot.addLayer(standarddialrange3);
I tried looking online and I could not figure out how to make it thicker. The way they are now makes them kind of hard to see on a display from far away. I tried changing the outer radius but it just made it so their were two thin lines, instead of one big thick one.
Override the
draw()
method ofStandardDialRange
and specify your preferredStroke
; I've used4.0f
in the example below. You'll need to recapitulate the existing code, using the public accessors as required.