Jfree chart change Y axis data?

Study this: public JFreeChart createChart(String axisX, String axisY){ JFreeChart chart = ChartFactory. CreateTimeSeriesChart(null, axisX, axisY, dataSeries, true, true, false); final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(); renderer. SetSeriesLinesVisible(0,true); renderer.

SetSeriesShapesVisible(0, true); //percentage (y-axis) final NumberAxis percentAxis = new NumberAxis(axisY); percentAxis. SetInverted(false); percentAxis. SetRange(0.0, 100.0); //time (x-axis) final DateAxis timeAxis = new DateAxis(axisX); timeAxis.

SetStandardTickUnits(DateAxis. CreateStandardDateTickUnits(TimeZone.getDefault(), Locale. ENGLISH)); double range = 0; switch (format){ case ONE_MINUTE_RANGE: range = 60*1000; break; case TEN_MINUTE_RANGE: range = 10*60*1000; break; case ONE_HOUR_RANGE: range = 60*60*1000; break; } timeAxis.

SetRange(System. CurrentTimeMillis()-range/2, System. CurrentTimeMillis()+range/2); //time duration based on format chosen XYPlot plot = chart.getXYPlot(); plot.

SetDomainAxis(timeAxis); plot. SetRangeAxis(percentAxis); plot. SetBackgroundPaint(Color.

White); plot. SetRangeGridlinePaint(Color. Gray); plot.

SetRangeZeroBaselinePaint(Color. Gray); plot. SetDomainGridlinePaint(Color.

Gray); plot. SetForegroundAlpha(0.5f); plot. SetRenderer(renderer); chart.

SetBackgroundPaint(Color. White); return chart; }.

Thank you! I have set the lower range to be my lowest pid and higher one to be the highest pid. Any pointers as to how to change width of the line in XY line chart?

– Sathya Mar 12 at 10:07 @user644575 you should use ChartPanel container to change the width and height of your JFreeChart object – eee Mar 16 at 13:51 @user644575: For the series line stroke (where you call it as "width"), use LineAndShapeRenderer. SetSeriesStroke(int series, java.awt. Stroke stroke) method to set the stroke.

– eee Mar 17 at 15:17.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions