Display dot on TimeSeriesChart when only one month exists ?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
sumanseshadri
Posts: 19
Joined: Mon Mar 27, 2006 5:19 am

Display dot on TimeSeriesChart when only one month exists ?

Post by sumanseshadri » Thu Mar 01, 2007 11:05 pm

Hi all,
Is there a way to display a dot on TimeSeriesChart when there is only data for only one month. For all others, I have

XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r;
renderer.setBaseShapesVisible(false);
renderer.setBaseShapesFilled(false);

Is there any way by which I can find out the count of the months along the X-axis..so that i can do...
if (count == 1) then setBaseShapesVistible(true)

Goal : In general in my trend chart, shapes should not be visible.But if there is only month, it should display a dot.

Any way to do it ?

Thanks in advance.
-Suman

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Fri Mar 02, 2007 12:07 am

How about

Code: Select all

if (dataset.getItemCount(0) == 1)

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Mar 02, 2007 6:07 pm

This would be a nice special case option to add to the XYLineAndShapeRenderer, I think.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked