chartjs / chartjs/chartjs-chart-financial

Inability to add a line chart to a candlestick chart

Open
#110 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
809
Forks
199
PR merge metrics
No merged PRs in 30d

Description

I am unable to get a line chart to render with a candlestick chart. I am using Chart.js@3.6.0, chartjs-chart-financial@0.1.0 and Angular with ng2-charts 3.0.0.rc.7

Here is my ts file:

this.financialChart = {
data: [
{
data: [
{
x: 1636069910000,
h: 30,
l: 20,
c: 22,
o: 24
},
{
x: 1636069930000,
h: 40,
l: 10,
c: 32,
o: 34
}
],
label: ''
},
{
data: [25, 28],
label: '',
type: 'line' as ChartType
}
],
type: 'candlestick' as ChartType,
labels: [],
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
x: {
min: 1636069900000,
max: 1636069950000,
time: {
displayFormats: {
minute: 'h:mm a'
}
},
adapters: {
date: {
locale: enUS
}
},
ticks: {
source: 'auto',
beginAtZero: true
}
}
}
},
plugins: {
datalabels: {
anchor: 'end',
align: 'end'
}
},
legend: false
};

Here is my html file:

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.