Skip to content

Commit

Permalink
fix static instance for numberformat
Browse files Browse the repository at this point in the history
  • Loading branch information
nicol authored and nicol committed Jan 3, 2024
1 parent 74b047b commit fe0ad93
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.magic.gui.abstracts.charts;

import java.text.DecimalFormat;
import java.text.NumberFormat;

import org.jfree.chart.ChartFactory;
import org.jfree.chart.axis.NumberAxis;
Expand All @@ -15,7 +15,7 @@ public abstract class Abstract2DHistoChart<B> extends MTGUI2DChartComponent<B,Ti
protected void createNewChart() {
chart = ChartFactory.createTimeSeriesChart(getTitle(), "Date", "Value", getDataSet(),showLegend(), true, false);

var formatter = DecimalFormat.getInstance();
var formatter = NumberFormat.getInstance();
formatter.setMinimumFractionDigits(2);

((NumberAxis)chart.getXYPlot().getRangeAxis()).setNumberFormatOverride(formatter);
Expand Down

0 comments on commit fe0ad93

Please sign in to comment.