Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade echarts and vue-echarts & Add fallback for visualMap when using heatmap #2450

Merged
merged 6 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ prev: /docs/ui/components/
</PropBlock>
<PropBlock type="TEXT" name="type" label="Type">
<PropDescription>
The type of the series.<br/><em>Note: heatmap needs a configured visual map and is not supported for time series</em>
The type of the series.<br/><em>Note: <code>heatmap</code> needs a configured visual map or uses the default and is not supported for time series!</em>
</PropDescription>
<PropOptions>
<PropOption value="line" label="Line" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ prev: /docs/ui/components/
</PropBlock>
<PropBlock type="TEXT" name="type" label="Type">
<PropDescription>
The type of the series.<br/><em>Note: heatmap needs a configured visual map and is not supported for time series</em>
The type of the series.<br/><em>Note: <code>heatmap</code> needs a configured visual map or uses the default and is not supported for time series!</em>
</PropDescription>
<PropOptions>
<PropOption value="heatmap" label="Heatmap" />
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.ui/doc/components/oh-data-series.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ prev: /docs/ui/components/
<PropGroup label="General">
<PropBlock type="TEXT" name="type" label="Type">
<PropDescription>
The type of the series.<br/><em>Note: heatmap needs a configured visual map and is not supported for time series</em>
The type of the series.<br/><em>Note: <code>heatmap</code> needs a configured visual map or uses the default and is not supported for time series!</em>
</PropDescription>
<PropOptions>
<PropOption value="gauge" label="undefined" />
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.ui/doc/components/oh-time-series.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ prev: /docs/ui/components/
</PropBlock>
<PropBlock type="TEXT" name="type" label="Type">
<PropDescription>
The type of the series.<br/><em>Note: heatmap needs a configured visual map and is not supported for time series</em>
The type of the series.<br/><em>Note: <code>heatmap</code> needs a configured visual map or uses the default and is not supported for time series!</em>
</PropDescription>
<PropOptions>
<PropOption value="line" label="Line" />
Expand Down
157 changes: 109 additions & 48 deletions bundles/org.openhab.ui/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions bundles/org.openhab.ui/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@
"@jsep-plugin/object": "^1.2.1",
"@jsep-plugin/regex": "^1.0.3",
"@jsep-plugin/template": "^1.0.2",
"@vue/composition-api": "^1.7.2",
"blockly": "^10.4.2",
"cronstrue": "^1.100.0",
"crypto-browserify": "^3.12.0",
"dayjs": "^1.9.6",
"dom7": "^2.1.5",
"echarts": "^5.1.2",
"echarts": "^5.5.0",
"event-source-polyfill": "^1.0.22",
"fast-deep-equal": "^3.1.3",
"framework7": "^5.7.12",
Expand All @@ -89,7 +90,7 @@
"vue-async-computed": "^3.9.0",
"vue-codemirror": "^4.0.6",
"vue-draggable-resizable": "^2.3.0",
"vue-echarts": "^4.1.0",
"vue-echarts": "^6.6.9",
"vue-fragment": "^1.5.1",
"vue-fullscreen": "^2.2.0",
"vue-grid-layout": "^2.3.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const seriesTypeParameter = (...types) => {
name: 'type',
type: 'TEXT',
label: 'Type',
description: 'The type of the series.<br/><em>Note: heatmap needs a configured visual map and is not supported for time series</em>',
description: 'The type of the series.<br/><em>Note: <code>heatmap</code> needs a configured visual map or uses the default and is not supported for time series!</em>',
limitToOptions: true,
options: types.map((o) => { return { value: o, label: seriesTypesLabels[o] } })
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</f7-list>
</f7-card>
</div>
<chart-skeleton :options="skeletonGridOptions(grid, gridIdx)" style="height: 400px; width: 100%" :autoresize="true" />
<chart-skeleton :option="skeletonGridOptions(grid, gridIdx)" style="height: 400px; width: 100%" :autoresize="true" />
</div>
<div>
<f7-menu v-if="context.editmode" class="configure-layout-menu">
Expand Down Expand Up @@ -121,7 +121,7 @@
</f7-list>
</f7-card>
</div>
<chart-skeleton :options="skeletonCalendarOptions(calendar, calendarIdx)" style="height: 400px; width: 100%" :autoresize="true" />
<chart-skeleton :option="skeletonCalendarOptions(calendar, calendarIdx)" style="height: 400px; width: 100%" :autoresize="true" />
</div>
</f7-block>

Expand Down Expand Up @@ -221,7 +221,18 @@
import widget from '@/components/widgets/widget-mixin'
import EditContextMenu from '@/components/pagedesigner/edit-menu.vue'

import ECharts from 'vue-echarts/components/ECharts'
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { LineChart, BarChart, GaugeChart, HeatmapChart, PieChart, ScatterChart } from 'echarts/charts'
import {
TitleComponent, LegendComponent, LegendScrollComponent, GridComponent, SingleAxisComponent, ToolboxComponent, TooltipComponent,
DataZoomComponent, MarkLineComponent, MarkPointComponent, MarkAreaComponent, VisualMapComponent, CalendarComponent
} from 'echarts/components'
import VChart from 'vue-echarts'

use([CanvasRenderer, LineChart, BarChart, GaugeChart, HeatmapChart, PieChart, ScatterChart, TitleComponent,
LegendComponent, LegendScrollComponent, GridComponent, SingleAxisComponent, ToolboxComponent, TooltipComponent, DataZoomComponent,
MarkLineComponent, MarkPointComponent, MarkAreaComponent, VisualMapComponent, CalendarComponent])

import * as dayjs from 'dayjs'
import IsoWeek from 'dayjs/plugin/isoWeek'
Expand All @@ -239,7 +250,7 @@ const defaultSlotComponentType = {
export default {
mixins: [widget],
components: {
'chart-skeleton': ECharts,
'chart-skeleton': VChart,
EditContextMenu
},
methods: {
Expand Down