From: Silas Boyd-W. <si...@gm...> - 2005-01-20 21:16:30
|
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 |