mirror of
https://github.com/elastic/kibana.git
synced 2025-04-22 17:04:01 -04:00
upgrading metric fontSize setting
This commit is contained in:
parent
e3023f4ea1
commit
2bcbfff895
2 changed files with 6 additions and 8 deletions
|
@ -1,4 +1,10 @@
|
||||||
const updateVisualizationConfig = (stateConfig, config) => {
|
const updateVisualizationConfig = (stateConfig, config) => {
|
||||||
|
|
||||||
|
if (config.type === 'gauge' && config.fontSize) {
|
||||||
|
config.gauge.style.fontSize = config.fontSize;
|
||||||
|
delete config.fontSize;
|
||||||
|
}
|
||||||
|
|
||||||
if (!stateConfig || stateConfig.seriesParams) return;
|
if (!stateConfig || stateConfig.seriesParams) return;
|
||||||
if (!['line', 'area', 'histogram'].includes(config.type)) return;
|
if (!['line', 'area', 'histogram'].includes(config.type)) return;
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
import _ from 'lodash';
|
|
||||||
|
|
||||||
export function vislibGaugeProvider() {
|
export function vislibGaugeProvider() {
|
||||||
|
|
||||||
return function (config) {
|
return function (config) {
|
||||||
if (!config.chart) {
|
|
||||||
config.chart = _.defaults({}, config, {
|
|
||||||
type: 'gauge'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue