mixed types
erikjonkers opened this issue · 6 comments
erikjonkers commented
Hi,
I try to use mixed types:
https://www.chartjs.org/docs/latest/charts/mixed.html
But the 'type' value is dominant at a higher level;
var chart = new Chart(ctx, {
type: "candlestick",
data: {
datasets: [{
type: "candlestick",
label: marketName,
data: candleData
}, {
type: "line",
label: supportLevel,
data: lineData
}
}
}
);
CupcakeThief commented
Daanra commented
Would you mind sharing your code? I'm also unable to get mixed types working.
CupcakeThief commented
Can't do that, as it's all in C#/Blazor, would be more confusing than helpful.
Instead I've twiddled the sample page, see pull request #97 which adds a line for close prices.
CupcakeThief commented
I've fixed tooltip labeling for mixed charts, under the same PR.
CupcakeThief commented
NB there's quite a big gotcha with financial plugin; parsing for datetime values is disabled by default, for performance.
Make sure you convert x values to epoch timestamps, e.g. as per demo page
x: luxon.DateTime.fromRFC2822(dateStr)