here’s the chart i get
after using this url string (with hardcoded data values)
https://quickchart.io/chart?c={type:‘bar’,data:{labels:[‘ac’,‘microwave’,‘cooler’,‘heater’,‘iron’], datasets:[{label:‘Watt’,data:[3,4,5,6,7],fill:false,borderColor:‘blue’},{label:‘KWH’,data:[2,2,5,5,3],fill:false,borderColor:‘green’}]}}
IMPORTANT NOTE:
when pasting code segments or cut-n-pasted strings to this forum, make sure you highlight it as preformatted text to retain the original coding. if not, a pair of apostrophes become a back tick and forward tick symbols! for example the code above becomes:
https://quickchart.io/chart?c={type:‘bar’,data:{labels:[‘ac’,‘microwave’,‘cooler’,‘heater’,‘iron’], datasets:[{label:‘Watt’,data:[3,4,5,6,7],fill:false,borderColor:‘blue’},{label:‘KWH’,data:[2,2,5,5,3],fill:false,borderColor:‘green’}]}}
if you cut-n-paste the string above to the browser, it results in invalid token error, but if you cut-n-paste the preformatted string to the browser, it works - you get a chart!
OTHER OBSERVATIONS
in this example, you are trying to compare apples and oranges - watt is a measure of rate, while KWH is a measure of amount of work, and they’re two different things - ie. the units are different. you were lucky the amounts for both dimensions were in the same ballpark. you can use a combo chart - bar chart for watt, line chart for KWH but this method assumes both dimensions are in the same unit, they use the same y-axis. in the end you might have to use 2 charts, labelled appropriately…