Pass queryConfig down to Dygraphs so it can make label decisions
parent
47b5f6cf4d
commit
e11d2d38aa
|
@ -102,10 +102,11 @@ const Visualization = React.createClass({
|
|||
const statements = queryConfigs.map(query => {
|
||||
const text =
|
||||
query.rawText || buildInfluxQLQuery(query.range || timeRange, query)
|
||||
return {text, id: query.id}
|
||||
return {text, id: query.id, queryConfig: query}
|
||||
})
|
||||
|
||||
const queries = statements.filter(s => s.text !== null).map(s => {
|
||||
return {host: [proxy], text: s.text, id: s.id}
|
||||
return {host: [proxy], text: s.text, id: s.id, queryConfig: s.queryConfig}
|
||||
})
|
||||
|
||||
return (
|
||||
|
|
|
@ -271,11 +271,12 @@ export default class Dygraph extends Component {
|
|||
const y = _.get(axes, ['y', 'bounds'], [null, null])
|
||||
const y2 = _.get(axes, ['y2', 'bounds'], undefined)
|
||||
const timeSeries = this.getTimeSeries()
|
||||
const ylabel = this.getLabel('y')
|
||||
|
||||
const updateOptions = {
|
||||
labels,
|
||||
file: timeSeries,
|
||||
ylabel: this.getLabel('y'),
|
||||
ylabel,
|
||||
axes: {
|
||||
y: {
|
||||
valueRange: getRange(timeSeries, y, ruleValues),
|
||||
|
|
Loading…
Reference in New Issue