Chartjs-Chart resizing in ng2-google-charts

2👍

You can just specify values for width and height in options. But it is not responsive.

pieChartData =  {
  chartType: 'PieChart',
  dataTable: [
    ['Task', 'Hours per Day'],
    ['Work',     11],
    ['Eat',      2],
    ['Commute',  2],
    ['Watch TV', 2],
    ['Sleep',    7]
  ],
  options: {'title': 'Tasks', 
            'width': 700,
            'height': 600},
};

Leave a comment