diff --git a/ui/src/shared/components/LayoutRenderer.js b/ui/src/shared/components/LayoutRenderer.js index 1457e86e23..f31b194fd3 100644 --- a/ui/src/shared/components/LayoutRenderer.js +++ b/ui/src/shared/components/LayoutRenderer.js @@ -104,11 +104,21 @@ export const LayoutRenderer = React.createClass({ ); } + const displayOptions = { + stepPlot: cell.type === 'line-stepplot', + stackedGraph: cell.type === 'line-stacked', + } + return (

{cell.name}

- +
); diff --git a/ui/src/shared/components/LineGraph.js b/ui/src/shared/components/LineGraph.js index ea36c088d5..dc67d37e17 100644 --- a/ui/src/shared/components/LineGraph.js +++ b/ui/src/shared/components/LineGraph.js @@ -63,7 +63,7 @@ export default React.createClass({ }, render() { - const {data, ranges, isFetchingInitially, isRefreshing, isGraphFilled, overrideLineColors, title, underlayCallback, queries, showSingleStat, ruleValues} = this.props; + const {data, ranges, isFetchingInitially, isRefreshing, isGraphFilled, overrideLineColors, title, underlayCallback, queries, showSingleStat, displayOptions, ruleValues} = this.props; const {labels, timeSeries, dygraphSeries} = this._timeSeries; // If data for this graph is being fetched for the first time, show a graph-wide spinner. @@ -75,7 +75,7 @@ export default React.createClass({ ); } - const options = { + const options = Object.assign({}, { labels, connectSeparatedPoints: true, labelsKMB: true, @@ -89,7 +89,7 @@ export default React.createClass({ underlayCallback, ylabel: _.get(queries, ['0', 'label'], ''), y2label: _.get(queries, ['1', 'label'], ''), - }; + }, displayOptions); let roundedValue; if (showSingleStat) {