Skip to content

Commit 01f2ca5

Browse files
committed
non-directional styles for no-data
1 parent fa66179 commit 01f2ca5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/core/chart-api/chart-extra-nodata.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ export class ChartExtraNodata extends AsyncStore<ReactiveNodataState> {
3737
}
3838
};
3939

40-
private getContainerStyle() {
41-
return { left: `${this.chart.plotLeft}px`, bottom: `${this.chart.chartHeight - this.chart.plotHeight}px` };
40+
private getContainerStyle(): React.CSSProperties {
41+
const inlineOffset = this.chart.chartWidth - this.chart.plotWidth;
42+
const blockOffset = this.chart.chartHeight - this.chart.plotHeight;
43+
return { insetInlineStart: `${inlineOffset}px`, insetBlockEnd: `${blockOffset}px` };
4244
}
4345

4446
private get chart() {

0 commit comments

Comments
 (0)