Hallo zusammen,
ich lasse eine Leistungs mit dem widget_dbplot anzeigen. Soweit klappt dies auch ganz gut.
Leider wird hier ein Wert unter 0 angezeigt, wie kann ich dies verhindern?
im Highcharts API Reference habe ich die Option "min" gefunden welche wohl die richtige ist. Diese müsste ich dann ja so definieren können:
{% import "widget_dbplot.html" as dbPlot %}
{% set plotOptions =
[
{
'update_trigger_gad': 'PW.W.act',
'device': 'MYSENSOR_154',
'reading': 'power',
'config': {
'name': 'Leistung gesamt',
'type': 'line'
}
}
]%}
{% set yAxisOptions = [
{
min:0
}
]%}
{{ dbPlot.linePlot('Powerplot', 'Leistung', '1440', '1440', 'Watt', '', plotOptions, 'yAxisOptions', '', 300) }}
dies hat aber keinen Einfluss auf den Grafen...
Wo liegt hier mein Fehler?
Gruß und Danke im Voraus
Lösung:
keine '' bei yAxisOptions verwenden... :-[
so gehts:
{% import "widget_dbplot.html" as dbPlot %}
{% set plotOptions =
[
{
'update_trigger_gad': 'PW.W.act',
'device': 'MYSENSOR_154',
'reading': 'power',
'config': {
'name': 'Leistung gesamt',
'type': 'line'
}
}
]%}
{% set yAxisOptions = [
{
min:0,
max:5000
}
]%}
{{ dbPlot.linePlot('Powerplot', 'Leistung', '1440', '1440', 'Watt', '', plotOptions, yAxisOptions, '', 300) }}