mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
feat(chart.js): allow to access charts container (#41537)
This allows to access readonly container for charts from global namespace required in some use-case scenarios. Thanks!
This commit is contained in:
committed by
Eli Barzilay
parent
d62fccf391
commit
a20b572cf4
@@ -302,6 +302,11 @@ const customTooltipsPieChart = new Chart(ctx, {
|
||||
// platform global values
|
||||
Chart.platform.disableCSSInjection = true;
|
||||
|
||||
// Chart instances in the global namespace
|
||||
for (const id in Chart.instances) {
|
||||
Chart.instances[id].resize();
|
||||
}
|
||||
|
||||
// default global static values
|
||||
Chart.defaults.global.defaultFontColor = '#544615';
|
||||
Chart.defaults.global.defaultFontFamily = 'Arial';
|
||||
|
||||
Vendored
+4
@@ -77,6 +77,10 @@ declare class Chart {
|
||||
|
||||
// Tooltip Static Options
|
||||
static Tooltip: Chart.ChartTooltipsStaticConfiguration;
|
||||
|
||||
static readonly instances: {
|
||||
[key: string]: Chart;
|
||||
};
|
||||
}
|
||||
declare class PluginServiceStatic {
|
||||
register(plugin: Chart.PluginServiceGlobalRegistration & Chart.PluginServiceRegistrationOptions): void;
|
||||
|
||||
Reference in New Issue
Block a user