-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade ECharts to v5, add support for ECharts gauge & chart widget (#…
…814) Add a oh-chart widget to add charts to layout pages; change oh-chart-page to use it. Add a oh-data-series component with the ability to add gauges representing a single value. Upgrade ECharts to v5.0.1. Also-by: Yannick Schaus <[email protected]> Signed-off-by: Boris Krivonog <[email protected]>
- Loading branch information
Showing
14 changed files
with
342 additions
and
166 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
32 changes: 3 additions & 29 deletions
32
bundles/org.openhab.ui/web/src/assets/definitions/widgets/chart/page.js
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 |
---|---|---|
@@ -1,33 +1,7 @@ | ||
// definitions for the chart page & widgets | ||
|
||
import { WidgetDefinition, po } from '../helpers' | ||
import { WidgetDefinition } from '../helpers' | ||
|
||
import ChartParameters from '../system/chart' | ||
export const OhChartPageDefinition = () => new WidgetDefinition('oh-chart-page', 'Chart Page', 'Visualize historical series') | ||
.params([ | ||
po('chartType', 'Chart Type', 'Define a fixed period for the chart, aligned at the beginning of the period, e.g. January 1st at midnight for a year chart. If not set (or set to dynamic), the length of the period will be configurable but certain combinations like aggregated series might not work', [ | ||
{ value: '', label: 'Dynamic period' }, | ||
{ value: 'day', label: 'Day' }, | ||
{ value: 'isoWeek', label: 'Week (starting on Monday)' }, | ||
{ value: 'week', label: 'Week (starting on Sunday)' }, | ||
{ value: 'month', label: 'Month' }, | ||
{ value: 'year', label: 'Year' } | ||
]).r(), | ||
po('period', 'Initial Period', 'The initial period for the chart', [ | ||
{ value: 'h', label: 'h' }, | ||
{ value: '2h', label: '2h' }, | ||
{ value: '4h', label: '4h' }, | ||
{ value: '12h', label: '12h' }, | ||
{ value: 'D', label: 'D' }, | ||
{ value: '2D', label: '2D' }, | ||
{ value: '3D', label: '3D' }, | ||
{ value: 'W', label: 'W' }, | ||
{ value: '2W', label: '2W' }, | ||
{ value: 'M', label: 'M' }, | ||
{ value: '2M', label: '2M' }, | ||
{ value: '4M', label: '4M' }, | ||
{ value: '6M', label: '6M' }, | ||
{ value: 'Y', label: 'Y' } | ||
]).v((value, configuration, configDescription, parameters) => { | ||
return !configuration.chartType | ||
}) | ||
]) | ||
.params(ChartParameters()) |
Oops, something went wrong.