You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Incorrect description
The X-axis chart of the DST is incorrect.
Copy
The environment time is Sydney DST.
Transfer Start DST Timestamp 1680363293000 Sun Apr 2 02:34:53 AEDT 2023
Transfer end DST timestamp 1680366053000 Sun Apr 2 02:20:53 AEST 2023
Expected Behavior
The X-axis time information is displayed correctly.
Screenshot
Blank is not displayed.
Some Picture can not upload........
** System (please fill in the following information): * *
Operating system: Euler
Font used:
Other Contexts;
TimeSeriesCollection xySeriesCollection = new TimeSeriesCollection();
TimeSeries series = new TimeSeries(“seriesName”);
xySeriesCollection .addSeries(series);
JFreeChart chart =
ChartFactory.createTimeSeriesChart(title, null, null, xySeriesCollection, true, false, false);
XYPlot plot = new XYPlot();
ValueAxis valueAxis = plot.getRangeAxis();
Range range = valueAxis.getRange();
double lowerBonder = 0d;
double upperBonder = range.getUpperBound();
upperBonder = upperBonder < 1 ? 1 : upperBonder;
Range newRange = new Range(lowerBonder, upperBonder);
valueAxis.setAutoRange(false);
valueAxis.setRange(newRange);
DateAxis axis = new DateAxis();
axis = (DateAxis) plot.getDomainAxis();
axis.setRangeWithMargins(startTime, endTime); // that time
axis.setLowerMargin(X_AXIS_ALIGN);
axis.setUpperMargin(X_AXIS_ALIGN);
axis.setTickMarkPosition(DateTickMarkPosition.START);
axis.setAutoRange(false);
plot.setBackgroundPaint(Color.white);
plot.setDomainGridlinePaint(Color.pink);
plot.setRangeGridlinePaint(Color.pink);
plot.setBackgroundAlpha(BACKGROUND_ALPHA);
plot.setForegroundAlpha(BACKGROUND_ALPHA);
ChartUtils.saveChartAsPNG(new File(“fileName”), chart, 1200, 360); // and picture's X-axis chart of the DST is not displayed.
I has used 1.5.1 JfreeChart
The text was updated successfully, but these errors were encountered:
For reference, using your timestamps and this epoch converter, I see the following event having a duration of 46 minutes; it looks like the event spans the return to standard time in Sydney.
Start: Saturday, April 01, 2023 03:34:53 PM GMT
End: Saturday, April 01, 2023 04:20:53 PM GMT
Start: Sunday, April 02, 2023 02:34:53 AM AEDT
End: Sunday, April 02, 2023 02:20:53 AM AEST
Second second = new Second(new Date(time), TimeZone.getDefault(), Locale.getDefault());
The reason is that the current time zone is used after the DST. Can the Date object be changed to the DateTimeZone object next time?
Incorrect description
The X-axis chart of the DST is incorrect.
Copy
The environment time is Sydney DST.
Transfer Start DST Timestamp 1680363293000 Sun Apr 2 02:34:53 AEDT 2023
Transfer end DST timestamp 1680366053000 Sun Apr 2 02:20:53 AEST 2023
Expected Behavior
The X-axis time information is displayed correctly.
Screenshot
Blank is not displayed.
Some Picture can not upload........
** System (please fill in the following information): * *
Operating system: Euler
Font used:
Other Contexts;
TimeSeriesCollection xySeriesCollection = new TimeSeriesCollection();
TimeSeries series = new TimeSeries(“seriesName”);
xySeriesCollection .addSeries(series);
JFreeChart chart =
ChartFactory.createTimeSeriesChart(title, null, null, xySeriesCollection, true, false, false);
XYPlot plot = new XYPlot();
ValueAxis valueAxis = plot.getRangeAxis();
Range range = valueAxis.getRange();
double lowerBonder = 0d;
double upperBonder = range.getUpperBound();
ChartUtils.saveChartAsPNG(new File(“fileName”), chart, 1200, 360); // and picture's X-axis chart of the DST is not displayed.
I has used 1.5.1 JfreeChart
The text was updated successfully, but these errors were encountered: