Pie chart problem

I wrote small widget to show wind direction. In edit mode widget shows perfect. Put on home page shows only label ‘Wind’ Speed is in left upper corner of card. no pie chart. After some time (probably during items involved update) it some times displays whole widget and sometimes only labels at correct position. When startAngle is a number, widget is always displayed correctly. Any Ideas how to fix ?

Add:
Widget is also correctly updated when switching to Locations and back to Overview.

uid: my-wind
tags: []
timestamp: May 21, 2021, 12:34:13 PM
component: f7-card
config:
  style:
    --f7-card-border-radius: 10px
    --f7-card-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.15)
    --f7-card-margin-horizontal: 5px
    --f7-card-margin-vertical: 10px
slots:
  default:
    - component: oh-chart
      config:
        height: 120px
      slots:
        series:
          - component: oh-data-series
            config:
              type: pie
              selectedMode: true
              zlevel: 100
              startAngle: =Math.trunc((-Number.parseInt(items.Wind_Direction.state )+100) % 360)
              data:
                - value: 5
                  name: =items.Wind_Speed.displayState + ' ' +items.Wind_Direction_Txt.state
                  selected: true
                  itemStyle:
                    color: rgba(251, 133, 0, 1)
                  label:
                    position: inner
                    fontWeight: bold
                    fontSize: 9
                - value: 95
                  itemStyle:
                    color: rgba(240,240,255,.8)
                  name: Wind
                  label:
                    show: true
                    position: inner

I also stumbled on something like this, but with gauges displaying multiple values - on initial load gauge is not rendered correctly and a switch between tabs is needed in order to fix the problem - from this point on everything works just fine.

I tried upgrading to latest ECharts 5.1.1 and cannot reproduce the problem anymore - if you are willing to test it out, I can provide a test bundle for you to give it a spin - please let me know.

Yes please. I’ll test this.

/Saš

Please run the following command from OH console (need OH 3.1):

bundle:update org.openhab.ui https://github.com/crnjan/openhab-webui/raw/feature/echarts_upgrade_to_5_1_1_bin/bundles/org.openhab.ui/bin/org.openhab.ui-3.1.0-SNAPSHOT.jar

Bundle contains latest webui code + this.

Please let me know how it goes.

One additional note - please make sure to clear browser cache and run the “Purge Caches and Refresh” command from About section to ensure your browser loads the updated code.

After applying update AND clearing browser cache is the problem solved. Thank You.

/Sas

Fix was merged so you should be able to use official builds - snapshot #2420 or later …