mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Upgrade XChart to 3.8.8 (#4628)
Upgrade XChart from 3.1.0 to 3.8.8 See changelog: https://knowm.org/open-source/xchart/xchart-change-log/ Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -15,10 +15,10 @@ https://github.com/openhab/openhab-core
|
|||||||
|
|
||||||
== Third-party Content
|
== Third-party Content
|
||||||
|
|
||||||
xchart-3.1.0
|
xchart-3.8.8
|
||||||
* License: Apache License, 2.0
|
* License: Apache License, 2.0
|
||||||
* Project: http://knowm.org/open-source/xchart
|
* Project: http://knowm.org/open-source/xchart
|
||||||
* Source: https://github.com/timmolter/XChart/tree/xchart-3.1.0
|
* Source: https://github.com/knowm/XChart/tree/xchart-3.8.8
|
||||||
|
|
||||||
== Third-party license(s)
|
== Third-party license(s)
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,7 @@ Private-Package: \
|
|||||||
org.knowm.xchart.*
|
org.knowm.xchart.*
|
||||||
Import-Package: \
|
Import-Package: \
|
||||||
de.erichseifert.vectorgraphics2d.*;resolution:=optional,\
|
de.erichseifert.vectorgraphics2d.*;resolution:=optional,\
|
||||||
|
de.rototor.pdfbox.*;resolution:=optional,\
|
||||||
|
com.madgag.*;resolution:=optional,\
|
||||||
|
org.apache.pdfbox.*;resolution:=optional,\
|
||||||
*
|
*
|
||||||
@@ -18,8 +18,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.knowm.xchart</groupId>
|
<groupId>org.knowm.xchart</groupId>
|
||||||
<artifactId>xchart</artifactId>
|
<artifactId>xchart</artifactId>
|
||||||
<!-- Newer versions have issues with customized grid lines, see: https://github.com/knowm/XChart/issues/628 -->
|
<version>3.8.8</version>
|
||||||
<version>3.1.0</version>
|
<!-- for pdfbox issue https://issues.apache.org/jira/browse/PDFBOX-5722 merged but not included in 3.8.8 -->
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.openhab.core.bundles</groupId>
|
<groupId>org.openhab.core.bundles</groupId>
|
||||||
|
|||||||
+4
-4
@@ -32,7 +32,7 @@ import org.eclipse.jdt.annotation.Nullable;
|
|||||||
import org.knowm.xchart.XYChart;
|
import org.knowm.xchart.XYChart;
|
||||||
import org.knowm.xchart.XYChartBuilder;
|
import org.knowm.xchart.XYChartBuilder;
|
||||||
import org.knowm.xchart.XYSeries;
|
import org.knowm.xchart.XYSeries;
|
||||||
import org.knowm.xchart.style.Styler;
|
import org.knowm.xchart.style.AxesChartStyler.TextAlignment;
|
||||||
import org.knowm.xchart.style.Styler.LegendPosition;
|
import org.knowm.xchart.style.Styler.LegendPosition;
|
||||||
import org.knowm.xchart.style.XYStyler;
|
import org.knowm.xchart.style.XYStyler;
|
||||||
import org.knowm.xchart.style.markers.None;
|
import org.knowm.xchart.style.markers.None;
|
||||||
@@ -194,14 +194,14 @@ public class DefaultChartProvider implements ChartProvider {
|
|||||||
// axis
|
// axis
|
||||||
styler.setAxisTickLabelsFont(chartTheme.getAxisTickLabelsFont(dpi));
|
styler.setAxisTickLabelsFont(chartTheme.getAxisTickLabelsFont(dpi));
|
||||||
styler.setAxisTickLabelsColor(chartTheme.getAxisTickLabelsColor());
|
styler.setAxisTickLabelsColor(chartTheme.getAxisTickLabelsColor());
|
||||||
styler.setXAxisMin(startTime.toInstant().toEpochMilli());
|
styler.setXAxisMin((double) startTime.toInstant().toEpochMilli());
|
||||||
styler.setXAxisMax(endTime.toInstant().toEpochMilli());
|
styler.setXAxisMax((double) endTime.toInstant().toEpochMilli());
|
||||||
int yAxisSpacing = Math.max(height / 10, chartTheme.getAxisTickLabelsFont(dpi).getSize());
|
int yAxisSpacing = Math.max(height / 10, chartTheme.getAxisTickLabelsFont(dpi).getSize());
|
||||||
if (yAxisDecimalPattern != null) {
|
if (yAxisDecimalPattern != null) {
|
||||||
styler.setYAxisDecimalPattern(yAxisDecimalPattern);
|
styler.setYAxisDecimalPattern(yAxisDecimalPattern);
|
||||||
}
|
}
|
||||||
styler.setYAxisTickMarkSpacingHint(yAxisSpacing);
|
styler.setYAxisTickMarkSpacingHint(yAxisSpacing);
|
||||||
styler.setYAxisLabelAlignment(Styler.TextAlignment.Right);
|
styler.setYAxisLabelAlignment(TextAlignment.Right);
|
||||||
// chart
|
// chart
|
||||||
styler.setChartBackgroundColor(chartTheme.getChartBackgroundColor());
|
styler.setChartBackgroundColor(chartTheme.getChartBackgroundColor());
|
||||||
styler.setChartFontColor(chartTheme.getChartFontColor());
|
styler.setChartFontColor(chartTheme.getChartFontColor());
|
||||||
|
|||||||
Reference in New Issue
Block a user