However I get an error 18 which is an invalid yAxis.
The way I try to do it is this way:
Here I set the axis
Code: Select all
testChart.value.addAxis({
id: 'testAxis',
min: lowestComparedY.y,
offset: 25,
type: props.dataset?.options?.yAxis?.type ?? 'linear',
opposite: true,
gridLineColor: cookieGet("theme") === "light" ? "#d1d5db" : "#374151",
}, false);
Here I set the series:
Code: Select all
testChart.value.addSeries({
yAxis: 'testAxis',
data: {
name: `Price '${props.dataset.comparedAsset.symbol}'`,
yAxis: 1,
turboThreshold: newData.length,
threshold: Number(newData.y),
boostThreshold: 1,
data: newData,
color: '#f0ba19',
states: {
hover: {
enabled: true,
lineWidth: 2,
},
},
}
})