Setting default Chart Size in OH2

Hi,

in Openhab it was possible to define a default chart size:

#
# Set the default height of a chart if the client doesn't provide this in the request
# defaults to 240
#chart:defaultHeight=240

#
# Set the default width of a chart if the client doesn't provide this in the request
# defaults to 480
#chart:defaultWidth=480

How do I achieve something similar in Openhab 2?

Would be nice if someone could answer.

I also can´t find this setting for OH2. The default chart size after installation is not really useful for practical purposes so it is necessary to define another chart size.

Also important because the tranparency/opacity of the chart legend box which is above the chart lines seems to be no longer available.

Thank you very much!

1 Like

That’s my opinion, too.

those settings do work for me. Could find it in the docs, just tried

org.eclipse.smarthome.ui.chart:defaultHeight=400
org.eclipse.smarthome.ui.chart:defaultWidth=800

how/where did you do this?

Where do i have to make this changes? Can you tell us more?

I just created a cfg file in services folder
/etc/openhab2/services/charts.cfg
you can probably also just add those lines to runtime.cfg

Ok, this works! Thank you very much!

In OH1 there was a setting for scaling too. Because on my smartphone i get a very big picture with small items and on my desktop computer the chart is still way to small for the screen resolution.

I will look for my old settings in OH1 and try this in OH2.

Now i have this settings in my charts.cfg:

org.eclipse.smarthome.ui.chart:provider=default
org.eclipse.smarthome.ui.chart:defaultHeight=800
org.eclipse.smarthome.ui.chart:defaultWidth=1500
org.eclipse.smarthome.ui.chart:scale=0.8

This works too:

org.eclipse.smarthome.ui.chart:provider=rrd4j

For scale:

org.eclipse.smarthome.ui.chart:scale=

scale only changes the aspect ratio on my android phone inside openhab app (formerly known as habdroid). I use 0.8. With 1 i have to move the chart up and down on my phone, with 0.8 i get it on one screen completely.

For anyone getting here through google (like me) this now can be set on the paperUI interface Configuration -> System -> Charts

2 Likes