line graph w/ selected labels and tick marks
Silas Boyd-Wickizer <[email protected]> Thu, 20 Jan 2005 13:16:19 -0800
| Newsgroups | gmane.comp.krysalis.jcharts.user |
|---|---|
| Message-ID | <[email protected]> |
Hi -
I want to create a line graph that only displays certain labels and
tick marks on the x-axis. For example, if I had the below data set
and code and I only want to display lable and tick marks for 1, 3, 5
and 7 how could I do it?
String[] xAxisLabels= { "1", "2", "3", "4", "5", "6", "7"};
DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle,
yAxisTitle, title );
double[][] data= new double[][]{ { 250, 45, -36, 66, 145, 80, 55 } };
...
...
...
axisProperties.getXAxisProperties().setShowTicks(
AxisTypeProperties.TICKS_ONLY_WITH_LABELS );
// null is for no legend
axisChart= new AxisChart( dataSeries, chartProperties, axisProperties,
null, defWidth, defHeight );
I tried populating the xAxisLabels with empty string, but I get "Zero
length string passed to TextLayout constructor." when I try to render
the graph.
Thanks - Silas
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl