Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: how to change Pie Chart Color

  1. #1
    Join Date
    May 2017
    Posts
    2

    Question how to change Pie Chart Color

    Hello ,

    I want to customize the colors of Pie chart, I found on the web a pre excutation function to change Bar char colors and i want to do the same, according to some intervales the colors change.

    Can you help with this ?

    Thanks in advance

  2. #2

    Default

    Try this

    function changePie(e){
    var cccOptions = this.chartDefinition;
    var eps = Dashboards.propertiesArrayToObject(cccOptions.extensionPoints);

    var analizar = e.resultset;


    var valor = analizar[0][2];

    if(valor >= 100){
    this.chartDefinition.colors = ['#727176', '#288f42']; //gris y verde
    }
    else
    if(valor < 100 && valor >= 95){
    this.chartDefinition.colors = ['#727176', '#d0cb22']; // gris y amarillo
    }
    else{
    this.chartDefinition.colors = ['#727176', '#a82522']; //gris y rojo
    }




    }

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2017 Pentaho Corporation. All Rights Reserved.