1

i'm trying to set the different measure for thickness in my chart in a webView for an iOS application.

enter image description here

I wish that the data in "red" have smaller thickness than data in center. This is the code that i used with chart.js library.

{
var ctx = document.getElementById("myChart");

    var data = {
                 datasets: [
                            {
                                data: [10, 90],
                                backgroundColor: ['ff0000', 'F8F8F8'],
                                hoverBackgroundColor: [colorA, colorB],
                            },
                            {
                                data: [60, 40],
                                backgroundColor: [colorA, colorB],
                                hoverBackgroundColor: [colorA, colorB],
                            },
                            {
                                data: [90, 10],
                                backgroundColor: ['F8F8F8', 'ff0000'],
                                hoverBackgroundColor: [colorA, colorB],
                            }

                        ]
    };

    var options = {
        ......,
        cutoutPercentage: 55,
    };

    // And for a doughnut chart
    var myDoughnutChart = new Chart(ctx, {
                                    type: 'doughnut',
                                    data: data,
                                    options: options
                                    });   

it seems that the options are for the entire chart and not for single data.

thanks again

Alessio Campanelli
  • 970
  • 11
  • 19
  • Unrelated to the code, but will changing that thickness be misleading? People think in area much better than angle. – Andrew Aug 03 '16 at 17:43

0 Answers0