arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.26k stars 4.82k forks source link

google Chart options not work with c=columnchart #22064

Closed NikLuy closed 2 months ago

NikLuy commented 2 months ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is. If i add an googlechart in the scripting language with $gc(lt eMonth elaMonth "wr" "Aktuell" "Letzter" "cnt0" "Tagesverbrauch") everithing works fine, but if i change to c=columnchart $gc(c eMonth elaMonth "wr" "Aktuell" "Letzter" "cnt0" "Tagesverbrauch") the options get not included to the script tag

var options = {chartArea:{left:60,width:440,right:30},'height':300,legend:'top',hAxis:{format:'# kWH'},backgroundColor: 'transparent',explorer:{actions:['dragToZoom', 'rightClickToReset']},series: {0: {type: 'area'}}, vAxis:{title:'Tag',ticks:[1,5,10,15,20,25,30]} , title:'Tagesverbräuche Monatsansicht'};var chart=new google.visualization.ColumnChart(document.getElementById('chart2'));chart.draw(data,options);}google.charts.setOnLoadCallback(drawChart);

$

$gc(c eMonth elaMonth "wr" "Aktuell" "Letzter" "cnt0" "Tagesverbrauch") $var options = { $chartArea:{left:60,width:440,right:30}, $'height':300, $legend:'top', $hAxis:{format:'# kWH'}, $backgroundColor: 'transparent', $explorer:{actions:['dragToZoom', 'rightClickToReset']}, $series: {0: {type: 'area'}},
$vAxis:{title:'Tag',ticks:[1,5,10,15,20,25,30]} ,
$title:'Tagesverbräuche Monatsansicht' $}; $gc(e)

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:

TO REPRODUCE

Steps to reproduce the behavior: add googlecart to >w section of tasmotascript

with two arrays M:p:eMonth=0 31, M:p:elaMonth=0 31 $

$gc(c eMonth elaMonth "wr" "Aktuell" "Letzter" "cnt0" "Tagesverbrauch") $var options = { $chartArea:{left:60,width:440,right:30}, $'height':300, $legend:'top', $hAxis:{format:'# kWH'}, $backgroundColor: 'transparent', $explorer:{actions:['dragToZoom', 'rightClickToReset']}, $series: {0: {type: 'area'}},
$vAxis:{title:'Tag',ticks:[1,5,10,15,20,25,30]} ,
$title:'Tagesverbräuche Monatsansicht' $}; $gc(e)

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. gc(e) should be in the same chart and not as a separate

SCREENSHOTS

If applicable, add screenshots to help explain your problem. image image

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

NikLuy commented 2 months ago

$gc(c eMonth elaMonth "wr" "Aktuell" "Letzter" "cnt0" "Tagesverbrauch") should be $gc(ct eMonth elaMonth "wr" "Aktuell" "Letzter" "cnt0" "Tagesverbrauch")

NikLuy commented 2 months ago

no issue