mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
add view area options to pick up chart background fix (#2613)
This commit is contained in:
@@ -149,6 +149,8 @@ export class Graph implements IInsight {
|
||||
let foreground = foregroundColor ? foregroundColor.toString() : null;
|
||||
let gridLinesColor = this._theme.getColor(editorLineNumbers);
|
||||
let gridLines = gridLinesColor ? gridLinesColor.toString() : null;
|
||||
let backgroundColor = this._theme.getColor(colors.editorBackground);
|
||||
let background = backgroundColor ? backgroundColor.toString() : null;
|
||||
|
||||
if (options) {
|
||||
retval.scales = {};
|
||||
@@ -187,12 +189,20 @@ export class Graph implements IInsight {
|
||||
}];
|
||||
}
|
||||
|
||||
retval.legend = {
|
||||
retval.legend = <ChartJs.ChartLegendOptions>{
|
||||
position: options.legendPosition as ChartJs.PositionType,
|
||||
display: options.legendPosition !== LegendPosition.None
|
||||
display: options.legendPosition !== LegendPosition.None,
|
||||
labels: {
|
||||
fontColor: foreground
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// these are custom options that will throw compile errors
|
||||
(<any>retval).viewArea = {
|
||||
backgroundColor: background
|
||||
};
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user