mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* fixing bad backport * 5.x defaults to stacked histogram
This commit is contained in:
parent
fa09b20bac
commit
b55100e46f
2 changed files with 7 additions and 6 deletions
|
@ -99,6 +99,7 @@ export function VisProvider(Notifier, Private) {
|
|||
_.cloneDeep(state.params || {}),
|
||||
_.cloneDeep(this.type.params.defaults || {})
|
||||
);
|
||||
if (!this.params.type) this.params.type = this.type.name;
|
||||
|
||||
updateVisualizationConfig(state.params, this.params);
|
||||
|
||||
|
|
|
@ -22,16 +22,16 @@ const updateVisualizationConfig = (stateConfig, config) => {
|
|||
};
|
||||
|
||||
// update series options
|
||||
const interpolate = config.smoothLines ? 'cardinal' : config.interpolate;
|
||||
const stacked = ['stacked', 'percentage', 'wiggle', 'silhouette'].includes(config.mode);
|
||||
const interpolate = config.smoothLines ? 'cardinal' : config.interpolate || 'linear';
|
||||
const stacked = ['stacked', 'percentage', 'wiggle', 'silhouette'].includes(config.mode || 'stacked');
|
||||
config.seriesParams[0] = {
|
||||
...config.seriesParams[0],
|
||||
type: config.type || 'line',
|
||||
type: config.type || config.seriesParams[0].type,
|
||||
mode: stacked ? 'stacked' : 'normal',
|
||||
interpolate: interpolate,
|
||||
drawLinesBetweenPoints: config.drawLinesBetweenPoints,
|
||||
showCircles: config.showCircles,
|
||||
radiusRatio: config.radiusRatio
|
||||
drawLinesBetweenPoints: config.drawLinesBetweenPoints || config.seriesParams[0].drawLinesBetweenPoints,
|
||||
showCircles: config.showCircles || config.seriesParams[0].showCircles,
|
||||
radiusRatio: config.radiusRatio || config.seriesParams[0].radiusRatio
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue