mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 07:16:39 +00:00
Fixed wrong ID used for Weather forecast graphs (#223)
* Fixed wrong ID used for Weather forecast graphs * Used static ID instead of entity_id computed one
This commit is contained in:
parent
31b87075f9
commit
fa0f91095d
@ -21,7 +21,7 @@
|
||||
<google-legacy-loader on-api-load='googleApiLoaded'></google-legacy-loader>
|
||||
<ha-card header='[[computeTitle(stateObj)]]'>
|
||||
<div class='content'>
|
||||
<div id$='[[computeChartId(stateObj)]]'></div>
|
||||
<div id='chart_id'></div>
|
||||
<ha-attributes state-obj='[[stateObj]]' extra-filters='forecast'></ha-attributes>
|
||||
</div>
|
||||
</ha-card>
|
||||
@ -50,10 +50,6 @@
|
||||
return stateObj.attributes.friendly_name;
|
||||
},
|
||||
|
||||
computeChartId: function (stateObj) {
|
||||
return 'chart_area_' + stateObj.id;
|
||||
},
|
||||
|
||||
getDataArray: function () {
|
||||
var dataArray = [];
|
||||
var data = this.stateObj.attributes.forecast;
|
||||
@ -84,7 +80,7 @@
|
||||
|
||||
if (!this.chartEngine) {
|
||||
this.chartEngine = new window.google.visualization.LineChart(
|
||||
document.getElementById(this.computeChartId(this.stateObj)));
|
||||
this.$.chart_id);
|
||||
}
|
||||
|
||||
this.drawChart();
|
||||
|
Loading…
x
Reference in New Issue
Block a user