Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Color chart series based on another series value(I want to keep the series value but color it using anoither seris value)
Color chart series based on another series value [message #1784607] Fri, 30 March 2018 08:53
Carutasu Alexandru is currently offline Carutasu AlexandruFriend
Messages: 1
Registered: March 2018
Junior Member
Hello guys.
Currently I am using a script to color a bar chart with a single Y series based on that series value. Out client want to keep the value there ( is a bar between 0 and 100%) but color it by another criteria. In these way he will see the actual value and,based on the colo, another value.
Right now I am coloring just one axe using these script. Can you help me to achieve these request, please. Thank you !


function beforeDrawDataPoint( dataPointHints, fill, scriptContext){
val = dataPointHints.getOrthogonalValue();
chart = scriptContext.getChartInstance();
if (val < 10)
fill.set(220, 51, 24); //yes - display in red
else
if (val >= 10 && val < 20)
fill.set(213, 75, 24);
else
if (val >= 20 && val < 30)
fill.set(207, 95, 24);
else
if (val >= 30 && val < 40)
fill.set(201, 115, 24);
else
if (val >= 40 && val < 50)
fill.set(195, 133, 24);
else
if (val >= 50 && val < 60)
fill.set(189, 150, 24);
else
if (val >= 60 && val < 70)
fill.set(175, 177, 24);
else
if (val >= 70 && val < 80)
fill.set(151, 171, 24);
else
if (val >= 80 && val < 90)
fill.set(87, 153, 24);
else
fill.set(36, 135, 23); //no - display in GREEN
}
Previous Topic:BeforeOpen Script Error
Next Topic:Computed Column Issue - URGENT please
Goto Forum:
  


Current Time: Sun Nov 18 07:57:03 GMT 2018

Powered by FUDForum. Page generated in 0.02219 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top