0

How can I change the default colour of the labels?

Here is default chart implementation, hope someone can help me

<script>
import { Pie} from 'vue-chartjs'

export default Pie.extend({

  props: ['one', 'two', 'three'],

    mounted () {
    // Overwriting base render method with actual data.
    this.renderChart({
      labels: ['One', 'Two', 'Three'],

      datasets: [
        {
          label: 'Stuff',
          backgroundColor: ['#C28535', '#8AAE56', '#B66C46'],
          data: [this.one, this.two, this.three]
        }
      ]
    })
    }
    })
    </script>

Cheers

4

1 回答 1

1

Check the Chart.js docs http://www.chartjs.org/docs/#chart-configuration-tooltip-configuration

I guess you mean the labels in the legend ? Or Toolip? Either way, you have to pass the object as options.

于 2017-04-12T17:46:34.843 回答