Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Chart.js combines Line Chart and Bar Chart in one canvas

Tags:

chart.js

I am trying to use Chart.js to display the data of Blood pressure, which include three sets of data(pulse, systolic, diastolic). the pulse data should display as line chart while systolic, and diastolic will be in bar chart. So I wondering there should be a way to combine them together.

PS. the updated Chart js provide the Stacked Bar Chart, which is pretty good to learn as the beginning of customizing Chart js.

like image 935
Jamie Gan Avatar asked Jul 10 '14 21:07

Jamie Gan


People also ask

How do you combine a bar and line graph?

Click anywhere in the chart you want to change to a combo chart to show the CHART TOOLS. Click DESIGN > Change Chart Type. On the All Charts tab, choose Combo, and then pick the Clustered Column - Line on Secondary Axis chart.

How do you combine two chart types?

Hold down the "Ctrl" key and click the second chart, so that both charts are selected at the same time. Click the "Page Layout" tab and then click the "Group" button in the Arrange area of the ribbon. A large box will surround both charts at once.


1 Answers

No you cannot, as is documented by this outstanding issue.

https://github.com/nnnick/Chart.js/issues/799

like image 124
William Entriken Avatar answered Oct 11 '22 07:10

William Entriken