Home
Designing Analytics Reports
Another chart color question
Migrateduser
<p>After lots of searching I've come up empty handed. I need to force the colors on an area chart. The code I use on a pie chart doesn't work, except on the legend. No matter what I change, the area will not change colors. What am I missing?</p>
<p> </p>
<p>Thanks for looking.</p>
<p>Hue</p>
<p> </p>
<div>function beforeDrawLegendItem( lerh, bounds, icsc ) {</div>
<div> var seriesValue = lerh.getLabel().getCaption().getValue();</div>
<div> var fill = lerh.getFill();</div>
<div> if( seriesValue == "BUILDING" )</div>
<div> fill.set(75,75,75);</div>
<div> if( seriesValue == "GARAGE" )</div>
<div> fill.set(204,204,0);</div>
<div>}</div>
<div> </div>
<div>function beforeDrawDataPoint( dph, fill, icsc ) { </div>
<div> if( dph.getBaseDisplayValue() == "BUILDING" )</div>
<div> fill.set(75,75,75);</div>
<div> if( dph.getBaseDisplayValue() == "GARAGE" )</div>
<div> fill.set(204,204,0);</div>
<div>}</div>
Find more posts tagged with
Comments
There are no comments yet