forked from openhab/openhab-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ChartServlet bug fixes and improvements
* Improve exception handling * Add transparent themes * Add null annotations * Use java.time classes instead of Date and magic numbers * Upgrade XChart to 3.1.0 For XChart release notes see: https://knowm.org/open-source/xchart/xchart-change-log/ On newer XChart versions there is an issue when using customized grid lines: knowm/XChart#628 Fixes openhab#1183 Related to openhab#2501 Supersedes openhab#2415 Signed-off-by: Wouter Born <[email protected]>
- Loading branch information
Showing
14 changed files
with
313 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...a/org/openhab/core/ui/internal/chart/defaultchartprovider/ChartThemeBlackTransparent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* Copyright (c) 2010-2021 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.core.ui.internal.chart.defaultchartprovider; | ||
|
||
import java.awt.Color; | ||
|
||
/** | ||
* Implementation of the black {@link ChartTheme chart theme} with transparent background. | ||
* | ||
* @author Wouter Born - Initial contribution | ||
*/ | ||
public class ChartThemeBlackTransparent extends ChartThemeBlack { | ||
|
||
private static final String THEME_NAME = "black_transparent"; | ||
|
||
@Override | ||
public String getThemeName() { | ||
return THEME_NAME; | ||
} | ||
|
||
@Override | ||
public Color getPlotBackgroundColor() { | ||
return new Color(0, 0, 0, 0); | ||
} | ||
|
||
@Override | ||
public Color getChartBackgroundColor() { | ||
return new Color(0, 0, 0, 0); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
.../org/openhab/core/ui/internal/chart/defaultchartprovider/ChartThemeBrightTransparent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* Copyright (c) 2010-2021 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.core.ui.internal.chart.defaultchartprovider; | ||
|
||
import java.awt.Color; | ||
|
||
/** | ||
* Implementation of the bright {@link ChartTheme chart theme} with transparent background. | ||
* | ||
* @author Wouter Born - Initial contribution | ||
*/ | ||
public class ChartThemeBrightTransparent extends ChartThemeBright { | ||
|
||
private static final String THEME_NAME = "bright_transparent"; | ||
|
||
@Override | ||
public String getThemeName() { | ||
return THEME_NAME; | ||
} | ||
|
||
@Override | ||
public Color getPlotBackgroundColor() { | ||
return new Color(0, 0, 0, 0); | ||
} | ||
|
||
@Override | ||
public Color getChartBackgroundColor() { | ||
return new Color(0, 0, 0, 0); | ||
} | ||
} |
Oops, something went wrong.