|
From: Chris M. <ch...@de...> - 2004-11-11 21:26:34
|
Yes, this is actually possible in the latest Alpha 1.0 CVS release.=20
So from the test/StackedBarTestDriver.java code base if we pass the
following data points:
double[][] data =3D {{-280, 16, -150, 90, 60, 200, 150, 60 },
{80, 216, -10, 30, 15, 90, 150, 87 } };
Paint[] paints =3D {Color.yellow, Color.blue };
String[] legendLabels =3D {"Test Legend Label", "second set"};
AxisChartDataSet axisChartDataSet =3D new AxisChartDataSet(
data, legendLabels, paints, ChartType.BAR_STACKED, =
stackedBarChartProperties
);
String[] axisLabels =3D {"1900", "1950", "2000", "2050",
"3000", "3050", "4000", "4050" };
IAxisDataSeries dataSeries =3D new DataSeries( axisLabels,
"Cookies", "Years", null );
dataSeries.addIAxisPlotDataSet( axisChartDataSet );
ChartProperties chartProperties =3D new ChartProperties();
AxisProperties axisProperties =3D new AxisProperties( false );
DataAxisProperties yAxis =3D (DataAxisProperties)
axisProperties.getYAxisProperties();
yAxis.setShowZeroLine(true);
We get the attached chart:
> -----Original Message-----
> From: jch...@li...=20
> [mailto:jch...@li...] On Behalf=20
> Of Thiago Henrique Burgos
> Sent: Thursday, 11 November 2004 1:47 a.m.
> To: jch...@li...
> Subject: [jCharts-users] STACKED BARS
>=20
> is it possible to put negative values on a stacked bar? Ex.:=20
> I would like to put a positve value for a stack and a=20
> negative value for the other stack on the same bar.
>=20
> --
> Thiago Henrique Burgos
> Engenheiro de Configura=E7=E3o
|