Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions google-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,19 @@ export class GoogleChart extends LitElement {
*/
private chartWrapper: google.visualization.ChartWrapper|null = null;

/**
* Returns the google.visualization.ChartLayoutInterface for the chart.
*
* Call this on the core chart and only after the chart is drawn
* (`google-chart-ready` event).
*/
get chartLayout() {
if (this.chartWrapper == null) return null;
const chart = this.chartWrapper.getChart();
return chart &&
(chart as google.visualization.CoreChartBase).getChartLayoutInterface();
}

private redrawTimeoutId: number|undefined = undefined;

protected override render() {
Expand Down