Ng2-charts: How can i get multi charts(bar and line) with ng2-charts?

Created on 26 Apr 2017  路  6Comments  路  Source: valor-software/ng2-charts

Most helpful comment

If you need something link in this link https://codepen.io/Karl53/pen/MbYrPN

i guess one need to add "type" attribute in your data
like below is the data variable (code) i passed to barchart and get bar chart for currency and line chart for days

barChartData = [
{data: [1,3,5,6], label: 'Days',type:'line', yAxisID: 'yAxis1'},
{data: [11,4,11,32], label: "currency" , yAxisID: 'yAxis2'}
];

All 6 comments

@neelshah23 Have you figured this out yet? I am also looking to be able to do this (bar and line) in one chart.

I am also looking for it.

nothing related?

If you need something link in this link https://codepen.io/Karl53/pen/MbYrPN

i guess one need to add "type" attribute in your data
like below is the data variable (code) i passed to barchart and get bar chart for currency and line chart for days

barChartData = [
{data: [1,3,5,6], label: 'Days',type:'line', yAxisID: 'yAxis1'},
{data: [11,4,11,32], label: "currency" , yAxisID: 'yAxis2'}
];

@lblower has the right answer, see this stackblitz https://stackblitz.com/edit/ng2-charts-bar-and-line

image

@paviad You saved our life Thanks genius

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tushartgsit picture tushartgsit  路  5Comments

mrpotato3 picture mrpotato3  路  5Comments

grahammutter picture grahammutter  路  4Comments

hggeorgiev picture hggeorgiev  路  4Comments

Adwind picture Adwind  路  3Comments