Merge pull request #3604 from influxdata/bugfix/table-graph-series-name

Bugfix/table graph series name
pull/10616/head
Deniz Kusefoglu 2018-06-08 17:55:10 -07:00 committed by GitHub
commit e61304aa85
2 changed files with 3 additions and 5 deletions

View File

@ -537,10 +537,6 @@ class TableGraph extends Component<Props, State> {
cellType: 'table',
})
// Argument of type '{ colors: ColorString; lastValue: ReactText; cellType: "table"; }' is not assignable to parameter of type '{ colors: any; lastValue: any; cellType?: CellType; }'.
// Types of property 'cellType' are incompatible.
// Type '"table"' is not assignable to type 'CellType'.
cellStyle = {
...style,
backgroundColor: bgColor,

View File

@ -89,6 +89,7 @@ const flattenGroupBySeries = (
},
],
responseIndex,
isGroupBy: true,
},
]
@ -142,10 +143,11 @@ const constructResults = (
const constructSerieses = (results: Result[]): Series[] => {
return _.flatten(
fastMap<Result, Series[]>(results, ({series, responseIndex}) =>
fastMap<Result, Series[]>(results, ({series, responseIndex, isGroupBy}) =>
fastMap<TimeSeriesSeries, Series>(series, (s, index) => ({
...s,
responseIndex,
isGroupBy,
seriesIndex: index,
}))
)