Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2801

Re: How to set the red color for Negative values in a Column Chart using the VizFrame

$
0
0

You just have to define multiple rules for all circumstances you want to have a special color and/or define a rule for all "others":

 

  1. oVizFrame.setVizProperties({ 
  2.      plotArea : { 
  3.           dataPointStyle : { 
  4.                rules : [
  5.                     { 
  6.                        callback : oRule, 
  7.                        properties : { 
  8.                             color : "red" 
  9.                        }, 
  10.                     displayName : "customName" 
  11.                     } ,
  12.          {
  13.             callback: oRule2,
  14.             properties: {
  15.                color: "green"
  16.             },
  17.             displayName: "customName2"
  18.          }
  19.               ],
  20.               others: {
  21.          properties: {
  22.              color: "yellow"
  23.          }
  24.               }
  25.           } 
  26.      } 
  27. });


If it doesn't work, you can give me an example on jsfiddle


Viewing all articles
Browse latest Browse all 2801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>