Fill with dashes instead of slashes or nulls
parent
cb265aeb8c
commit
d721fe590f
|
@ -132,8 +132,7 @@ export const groupByTimeSeriesTransform = (raw = [], queryASTs = []) => {
|
||||||
|
|
||||||
const sortedLabels = _.sortBy(labels, 'label')
|
const sortedLabels = _.sortBy(labels, 'label')
|
||||||
const tsMemo = {}
|
const tsMemo = {}
|
||||||
const nullArray = Array(sortedLabels.length).fill('null')
|
const dashArray = Array(sortedLabels.length).fill('-')
|
||||||
const slashArray = Array(sortedLabels.length).fill('-')
|
|
||||||
|
|
||||||
const labelsToValueIndex = reduce(
|
const labelsToValueIndex = reduce(
|
||||||
sortedLabels,
|
sortedLabels,
|
||||||
|
@ -150,7 +149,7 @@ export const groupByTimeSeriesTransform = (raw = [], queryASTs = []) => {
|
||||||
forEach(serieses, s => {
|
forEach(serieses, s => {
|
||||||
if (groupBys[s.responseIndex]) {
|
if (groupBys[s.responseIndex]) {
|
||||||
forEach(s.values, vs => {
|
forEach(s.values, vs => {
|
||||||
timeSeries.push({time: vs[0], values: clone(slashArray)})
|
timeSeries.push({time: vs[0], values: clone(dashArray)})
|
||||||
existingRowIndex = timeSeries.length - 1
|
existingRowIndex = timeSeries.length - 1
|
||||||
forEach(vs.slice(1), (v, i) => {
|
forEach(vs.slice(1), (v, i) => {
|
||||||
const label = s.unsortedLabels[i].label
|
const label = s.unsortedLabels[i].label
|
||||||
|
@ -179,7 +178,7 @@ export const groupByTimeSeriesTransform = (raw = [], queryASTs = []) => {
|
||||||
if (existingRowIndex === undefined) {
|
if (existingRowIndex === undefined) {
|
||||||
timeSeries.push({
|
timeSeries.push({
|
||||||
time,
|
time,
|
||||||
values: clone(slashArray),
|
values: clone(dashArray),
|
||||||
})
|
})
|
||||||
|
|
||||||
existingRowIndex = timeSeries.length - 1
|
existingRowIndex = timeSeries.length - 1
|
||||||
|
|
Loading…
Reference in New Issue