fix formatting
This commit is contained in:
@@ -49,11 +49,11 @@ export function LineChart({
|
|||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
data: specData,
|
data: specData,
|
||||||
...(isMultiYAxis ? {
|
...(isMultiYAxis
|
||||||
transform: [
|
? {
|
||||||
{ fold: yAxis, as: ['key', 'value'] }
|
transform: [{ fold: yAxis, as: ['key', 'value'] }],
|
||||||
]
|
}
|
||||||
} : {}),
|
: {}),
|
||||||
selection: {
|
selection: {
|
||||||
grid: {
|
grid: {
|
||||||
type: 'interval',
|
type: 'interval',
|
||||||
@@ -70,18 +70,22 @@ export function LineChart({
|
|||||||
field: isMultiYAxis ? 'value' : yAxis,
|
field: isMultiYAxis ? 'value' : yAxis,
|
||||||
type: yAxisType,
|
type: yAxisType,
|
||||||
},
|
},
|
||||||
...(symbol ? {
|
...(symbol
|
||||||
|
? {
|
||||||
color: {
|
color: {
|
||||||
field: symbol,
|
field: symbol,
|
||||||
type: 'nominal'
|
type: 'nominal',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
} : {}),
|
: {}),
|
||||||
...(isMultiYAxis ? {
|
...(isMultiYAxis
|
||||||
|
? {
|
||||||
color: {
|
color: {
|
||||||
field: 'key',
|
field: 'key',
|
||||||
type: 'nominal'
|
type: 'nominal',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
} : {})
|
: {}),
|
||||||
},
|
},
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,9 @@ Must be an object with one of the following properties: `url` or `values` \n\n \
|
|||||||
description: 'Type of the Y-axis',
|
description: 'Type of the Y-axis',
|
||||||
},
|
},
|
||||||
symbol: {
|
symbol: {
|
||||||
description: 'Name of the column header or object property that represents a series for multiple series.',
|
description:
|
||||||
}
|
'Name of the column header or object property that represents a series for multiple series.',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -91,7 +92,6 @@ export const MultiSeries: Story = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export const MultiColumns: Story = {
|
export const MultiColumns: Story = {
|
||||||
name: 'Line chart with multiple series (with multiple columns)',
|
name: 'Line chart with multiple series (with multiple columns)',
|
||||||
args: {
|
args: {
|
||||||
@@ -105,7 +105,7 @@ export const MultiColumns: Story = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
xAxis: 'year',
|
xAxis: 'year',
|
||||||
yAxis: ['A', 'B', 'C']
|
yAxis: ['A', 'B', 'C'],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user