Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught SyntaxError: Unexpected token '{' #94

Closed
christoph-morrison opened this issue Apr 20, 2020 · 0 comments
Closed

Uncaught SyntaxError: Unexpected token '{' #94

christoph-morrison opened this issue Apr 20, 2020 · 0 comments
Assignees
Labels
bug Something isn't working waiting for release Is waiting for to be released
Milestone

Comments

@christoph-morrison
Copy link
Collaborator

FHEM Forum:

fhem?detail=BR_weblink line 1734:
Uncaught SyntaxError: Unexpected token '{'

return <<'CHART'
<div id='chart_${name}'; style='width:100%; height:100%'></div>
<script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>
<script type='text/javascript'>
google.charts.load('current', {packages:['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['string', '${legend}'],
${data}
]);
var options = {
title: '${title}',
hAxis: {
title: '${hAxis}',
slantedText:true,
slantedTextAngle: 45,
textStyle: {
fontSize: 10}
},
vAxis: {
minValue: 0,
title: '${vAxis}'
}
};
var my_div = document.getElementById(
'chart_${name}'); var chart = new google.visualization.AreaChart(my_div);
google.visualization.events.addListener(chart, 'ready', function () {
my_div.innerHTML = '<img src='' + chart.getImageURI() + ''>';
});
chart.draw(data, options);}
</script>
CHART

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for release Is waiting for to be released
Development

No branches or pull requests

1 participant