Pie Chart - Changing Colors / Sorting

Answered

Comments

4 comments

  • Avatar
    VIKRAM DUMALA

    Dear Bhuvana Govindaraju,
    we can adjust colors on pie chart
    fallow thease steps :
    Go to pie chart you want to applay colors on pie chart-->edit->categories-->Right click on Category value -->(here go to any other color website like "https://www.w3schools.com/colors/colors_mixer.asp" and copy one color code like:#FF0000 and paste it into pie chart Color Palette ) the see the results

    Thanks and regards

    0
    Comment actions Permalink
  • Avatar
    Bhuvana Govindaraju

    Hi Vikram

    Thanks for the suggestion. I could try that way but it would restrict the color selection to that particular pie chart (of a particular customer). What I am looking for is a way to make Pie chart automatically color from dark to light shades of a color, irrespective of the data chosen at Dashboard level. 

    Regards,

    Bhuvana

    0
    Comment actions Permalink
  • Avatar
    Yoni Lerner

    Hi Bhuvana,

    The suggestion Vikram has is the only out of the box solution now.

    If you wish to have a more "automatic" way to do this please open a ticket regarding your request.

    0
    Comment actions Permalink
  • Avatar
    Sharon Krepner

    you can use this script to manually sort by the category values of your pie chart:

    *note: you should replace the values in the categories array below to your own values and in the order you want them to show.

    var categories = ['Very Satisfied','Satisfied','OK','Disatisfied','Very Disatisfied'];
    widget.on('queryend',function(se,ev)
    {
    ev.rawResult.values.sort(function(a,b)
    {
    var aIndex = categories.indexOf(a[0].data);
    var bIndex = categories.indexOf(b[0].data);

    if(aIndex < bIndex)
    {
    return -1;
    }
    if(aIndex > bIndex)
    {
    return 1;
    }

    return 0;
    });
    });

     

    0
    Comment actions Permalink

Please sign in to leave a comment.