RTL support for history timeline (#2444)

* RTL support in history timeline

* RTL support in history timeline
This commit is contained in:
yosilevy 2019-01-12 00:53:23 +02:00 committed by Paulus Schoutsen
parent ebbd308be6
commit 5ae599b1b2

View File

@ -20,6 +20,10 @@ class StateHistoryChartTimeline extends LocalizeMixin(PolymerElement) {
:host([rendered]) {
opacity: 1;
}
ha-chart-base {
direction: ltr;
}
</style>
<ha-chart-base
data="[[chartData]]"
@ -185,6 +189,11 @@ class StateHistoryChartTimeline extends LocalizeMixin(PolymerElement) {
afterSetDimensions: (yaxe) => {
yaxe.maxWidth = yaxe.chart.width * 0.18;
},
position: this.hass.translationMetadata.translations[
this.hass.selectedLanguage || this.hass.language
].isRTL
? "right"
: "left",
},
],
},