Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Change color of bar in bar chart based on date value on X-axis
Migrateduser
<p>Hi,</p><p> </p><p>I am trying to change the color of the bars in a bar chart. The idea is to mark all bars red, where the date value on the X-axis is lower than today.</p><p> </p><p>I have tried this script </p><pre class="_prettyXprint _lang-js">function beforeDrawDataPoint(dph, fill, icsc){ var sValue = dph.getBaseDisplayValue(); var today = new Date(); var sValueDate = new Date('2011-04-11T11:51:00'); Packages.java.lang.System.out.println("today: " + today); Packages.java.lang.System.out.println("sValue: " + sValue); Packages.java.lang.System.out.println("sValueDate: " + sValueDate); if ( sValue < today ) { fill.set(255, 0, 0); }}</pre><p>but it seems to be as if the variables 'today' and sValue are not really compatible to each other. Could someone please give me a hint on how to parse the date value from the x-axis so it is compatible with the today variable?</p><p> </p><p>Rgds</p><p> </p><p>Max</p>
Find more posts tagged with
Comments
There are no comments yet