Is it possible to have two advanced formats expressions for a pie chart?

I am trying to get custom colors as well as percentages on my pie charts for my dashboard. I came across this advanced formula so I can see percentages on my pie charts. 


AdvancedFormat_Init(DataPointFormats:,DataSeriesFormats:,XAxisJSON:,YAxisJSON:,HighchartsJSON:
"tooltip: { enabled: true, formatter: function() {
        return this.point.name +': '+ this.point.y +' (<b>'+this.percentage.toFixed(1) +'</b>%)';}}")


but I also need custom colors and created advanced formats for HighchartsJSON so I can customize the colors. I have one or the other working, but ideally I would like to have both work. Any help would be appreciated it! 


Hi,

For adding a custom color, use the color property of piechart.

Regards.

Prasad Rao wrote:

Hi,

For adding a custom color, use the color property of piechart.

Regards.

So how do I utilize the color property? When I try to put the color parameters in like #9e9e9e it doesn't accept that. 


Hi,

color property accepts a text value. While populating the Datapoint, you have to set the colors if you hard code it like below all the pie will have same color.

Regards.


Solution

Hi,

If you still want to use the color via advance format below is the option.

AdvancedFormat_Init(DataPointFormats:,DataSeriesFormats:,XAxisJSON:,YAxisJSON:,HighchartsJSON:
"{
    tooltip: { 
        enabled: true, 
        formatter: function() {
            return this.point.name +': '+ this.point.y +' (<b>'+this.percentage.toFixed(1) +'</b>%)';
        }
    },
    colors: ['#2f7ed8', '#0d233a', '#8bbc21']
}")

Regards.

Solution

Prasad Rao wrote:

Hi,

If you still want to use the color via advance format below is the option.

AdvancedFormat_Init(DataPointFormats:,DataSeriesFormats:,XAxisJSON:,YAxisJSON:,HighchartsJSON:
"{
    tooltip: { 
        enabled: true, 
        formatter: function() {
            return this.point.name +': '+ this.point.y +' (<b>'+this.percentage.toFixed(1) +'</b>%)';
        }
    },
    colors: ['#2f7ed8', '#0d233a', '#8bbc21']
}")

Regards.

That works perfectly thank you for sharing that!