Hi, I am trying to have a line drawn across a chart as an average of the Vertical Bar Chart.
Now from the documentation which I bought, and is quite informative, it suggests combining using xyplots.
However I wish to have a vertical barchart that has say 3 months
Jan, feb and march and in each series for each months has two values.
i.e Jan Sales, Jan Calls, Feb Sales, Feb Calls, Mar Sales, March Calls.
I can only get one chart per value with the XYPlot.
Any tips to help me out??
Justin King
Average Line on Vertical Bar Chart
Re: Average Line on Vertical Bar Chart
Hi Justin,
You can add any number of horizontal "marker" lines to a vertical bar chart by using the addRangeMarker(...) method in the CategoryPlot class. You will need to calculate the average yourself, and create a Marker object (which could do with another constructor that needs just a value and uses defaults for everything else...I'll fix that).
Let me know if that doesn't work for you.
Regards,
DG.
You can add any number of horizontal "marker" lines to a vertical bar chart by using the addRangeMarker(...) method in the CategoryPlot class. You will need to calculate the average yourself, and create a Marker object (which could do with another constructor that needs just a value and uses defaults for everything else...I'll fix that).
Let me know if that doesn't work for you.
Regards,
DG.