Hey! Glad you like it! Pie support was not added since, as also @ysc mentioned, I did not see a direct need for it so I did not include it. But in order to add support, just a single import needs to be added …
I tried adding it and it adds ~5000 bytes to resulting jar
No problem to add it as well, I checked the gauge before merging, it was also a ~10kB overhead. We don’t want to add everything but pies make sense now that we have a 1-dimensional series component.
Wow! I think pies make sense for sure!
Of course I am a data lover and can’t get enough, but I can see pie charts have a real application for their broad user community.
I’m thinking of:
thanks for your work and the possibility using some powerful charting features inside of widgets.
I tried to dive into the documentation today and slowly getting a felling of the very extensive customization options. But one thing I couldn’t find a hint for in the docs is, how to get rid of the floating menu popup for the date selection in the top-right?
Is it already possible to add a “oh-chart” (line chart) component to a widget in OH 3.0.1 ?
If yes, can someone tell me how? Cause it’s not working with my thermostat widget
This will be part of 3.1 release - you can use 3.1 snapshot version if you want to try it out (@BobMiles latest snapshot 2169 also includes pie support).
Some things I recognized while fiddling around with the ECharts:
Line charts (and maybe other chart types) will set its own background in dark mode, instead of being transparent as in light mode - so that custom styling on the enclosing component gets hidden behind.
You mentioned it already, but there are some missing components & props within the inline help (like oh-chart-title, oh-chart-toolbox, oh-chart-tooltip and maybe more…)
Somehow connected to the above point - it’s hard to abstract the configuration of the charts from the ECharts example page to the YAML configuration in OH.
Understanding what is a component and what is a setting took me some time and I’m still struggling on some of them…
Example #1: Assigning a background gradient to a line-chart.
How would I translate this part new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
to usable YAML?
Or is it even necessary to work with these custom echart graphic classes (if this is the right term here…)?
Example #2: Changing the timestamp-format in the tooltip.
I couldn’t find anything obvious about changing the tooltip-timestamp to a local format (like dd. MM yyyy) in the docs - a google search brought me to this function (which don’t work):
Example changing timestamp in a tootltip (via google search)
I could imagine that executing js functions isn’t allowed for security reasons?! Or did I miss anything here?
I think adding the single axis (timeline)-chart could also be helpful in the future, to achieve something like the BasicUI timeline inside the MainUI without have to fiddle something similar with f7-components:
See → Timeline for Basic UI - #15 by Mihai_Badea
The single axis type, looks like it would fit that use-case?!
Maybe you’ll find time give me some advice here or at least use this for future development of the implementation.
Hi,
I’m on 3.1 snapshot now, too, and testing around.
One big issue for me: On my android devices the charts are not displayed, neither the chart pages nor the chart widgets.
It will show the legend, the min/max balloons, the points, but not the bars or the lines of the series.
The chart isn’t displayed correctly on my Andorid device (Android 8.0.0 on Samsung Galaxy S8)
I tried to look at the used datapoints and it seems, that somehow not all of the available datapoints can be accessed on mobile (and returns null) - on Desktop all of these datapoints are available.
Hey! I have been using/testing with Safari and Chrome from both laptop and iPhone and did not notice any problems - however, based on your feedback did try to access OH through https://home.myopenhab.org/... and while it renders perfectly fine on my laptop (both Safari and Chrome), it does not seem to render i.e. gauge on my iPhone (again, in both Safari and Chrome) - will check what is going on, but first will upgrade to a more recent snapshot since I’m still on #2155 … but don’t think this will change anything. Small hint, you can always upgrade MainUI using
Just checked why gauge would not work on my iPhone - and seen that js files did not yet contain the new additions - so cleared browser cache + did a purge cache in the about section - now everything loads in both Safari and Chrome on my iPhone too.