mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -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 foreground = foregroundColor ? foregroundColor.toString() : null;
|
||||||
let gridLinesColor = this._theme.getColor(editorLineNumbers);
|
let gridLinesColor = this._theme.getColor(editorLineNumbers);
|
||||||
let gridLines = gridLinesColor ? gridLinesColor.toString() : null;
|
let gridLines = gridLinesColor ? gridLinesColor.toString() : null;
|
||||||
|
let backgroundColor = this._theme.getColor(colors.editorBackground);
|
||||||
|
let background = backgroundColor ? backgroundColor.toString() : null;
|
||||||
|
|
||||||
if (options) {
|
if (options) {
|
||||||
retval.scales = {};
|
retval.scales = {};
|
||||||
@@ -187,12 +189,20 @@ export class Graph implements IInsight {
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
retval.legend = {
|
retval.legend = <ChartJs.ChartLegendOptions>{
|
||||||
position: options.legendPosition as ChartJs.PositionType,
|
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;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user