Open r-jean-pierre opened 1 year ago
Interesting, I do add hoverinfo: 'skip'
on the "fake" traces used for show_value
https://github.com/dbuezas/lovelace-plotly-graph-card/blob/master/src/parse-config/parse-config.ts#LL208C22-L208C22
Is there anything special in the rest of the yaml?
Interesting, I do add
hoverinfo: 'skip'
on the "fake" traces used forshow_value
https://github.com/dbuezas/lovelace-plotly-graph-card/blob/master/src/parse-config/parse-config.ts#LL208C22-L208C22Is there anything special in the rest of the yaml?
except:
hovermode: "x unified"
and a personal hovertemplate
, i really have nothing special
Uhm. The hovertemplate may be overriding it.
I could add an extra property to remove the hovertemplate from the "fake" trace I use for show_value
. Can you check if removing "hovertemplate" from the entity makes it disappear?
So, almost sure that it's not related to the templating, here is a minimalistic, but complete, example:
- type: custom:plotly-graph # test nrj
entities:
- entity: sensor.myenedis_05606946388355
filters:
- fn: |-
({ meta }) => ({
xs: meta.dailyweek.map((date) => new Date(date)-3600*1000).reverse(),
ys: meta.daily.map(value => value).reverse()
})
show_value: true
- entity: sensor.myenedis_05606946388355
filters:
- fn: |-
({ meta }) => ({
xs: meta.dailyweek.map((date) => new Date(date)-3600*1000).reverse(),
ys: meta.daily.map(value => value).reverse()
})
show_value: true
layout:
hovermode: "x unified" # -> this option is guilty
hours_to_show: 180h
time_offset: -30h
if i use the default hovermode, than it is what could be expected:
Then it looks like it is a plotly bug :/ Just found this: https://github.com/plotly/plotly.js/issues/5516
maybe try with hoverinfo: none
instead of skip
Ok, it needs both hoverinfo and hovertemplate
hovertemplate: false
hoverinfo: none
adding these two to an entity makes the tooltip go away, even in x-unified hover mode.
I'll keep this open and fix in the next release by adding those two to the template of the fake trace used for show_value.
In the meanwhile if it bothers you, you could add a second trace with no hoverinfo and template, remove all but the last datapoints and set show_value on it.
Describe the bug Only if data is generated by
filters-fn
, the legend of the first point (show_value
) gets extra information from I suppose the underlying-fake-scatterplotScreenshots
while other data points are perfect:
yaml