(HABPanel) Debug entries "Illegal argument in chart" to log when chart is selected

I observed my HABPanel writing following entries to log in DEBUG mode:

18:00:55.561 [DEBUG] [4j.internal.charts.RRD4jChartServlet] - Illegal argument in chart: {}
java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
....

The corresponding section of my HABPanel is configured like this:

{
    "id": "Sprit Chart Day",
    "name": "Sprit Chart Day",
    "widgets": [
        {
            "name": "Sprit Chart Day",
            "sizeX": 12,
            "sizeY": 4,
            "item": "E10_1",
            "type": "chart",
            "charttype": "interactive",
            "service": "rrd4j",
            "period": "D",
            "isgroup": false,
            "axis": {
                "y": {},
                "y2": {
                    "enabled": false
                }
            },
            "series": [
                {
                    "axis": "y",
                    "display_line": true,
                    "display_area": true,
                    "name": "Station 1",
                    "item": "E10_1",
                    "color": "#0000FF"
                },
                {
                    "axis": "y",
                    "display_line": true,
                    "display_area": true,
                    "item": "E10_2",
                    "name": "Station 2",
                    "color": "#00FF00"
                },
                {
                    "axis": "y",
                    "display_line": true,
                    "display_area": true,
                    "color": "#FF0000",
                    "name": "Station 3",
                    "item": "E10_3"
                }
            ],
            "row": 0,
            "col": 0,
            "$$hashKey": "object:644"
        }
    ],
    "row": 1,
    "col": 2,
    "tile": {
        "backdrop_iconset": "freepik-housethings",
        "backdrop_icon": "bathroom-faucet-tool",
        "backdrop_center": true,
        "iconset": "freepik-housethings",
        "icon": "bathroom-faucet-tool"
    },
    "$$hashKey": "object:13"
},

In the actual use of the Panel no problem is observed (all data is displayed as desired, the database does hold values for a whole day ), only when enabling the DEBUG on the Karaf-console the above logging is shown. Which Width or height is zero??

Confirmed, this is a bug in the chart widget.
It tries to load image charts (with wrong parameters, obviously) even if the “interactive” chart type is selected.
I’ll fix it. Thanks @opus!

1 Like

https://github.com/openhab/org.openhab.ui.habpanel/pull/179 should fix it!