Pentaho CCC/CDE tool Extension points.
Pentaho CDE tool, Extension points are very useful feature. You can treat this extension points as a advance setting or property of CCC Bar/Pie/any chart. By setting this extension points you can achieve the below sample thing, yes off course list is too much so we are not mentioning all of this.
n Change the X axis Label
n Change X axis label fonts , COLOR , alignment (vertical , diagonal).
n Same way you can change the Y axis lables/fonts.
Problem1:How can I rotate x axis labels diagonally in CCC Bar chart with help of extension points.
Solution: In CDE, Open the related CCC chart component, click on the “Advance Properties” of that component and select the extension points, it will open the one popup window , Add below extension point to rotate the x Axis lables.
Arg0: xAxisLabel_textAngle Val0: -0.8
Arg1: xAxisLabel_textAlign Val1: right
Please note that we have provided here angle of -0.8 (negative 0.8) , you can customize your angle as per your need. if you are working on CDA not through CDE , then you need to add the extention point with above 2 argument as shown below.
var render_top_load_chart = {
..........
extensionPoints: [["xAxisLabel_textAngle","-1.3"],["xAxisLabel_textAlign","right"]]
}
Problem2:How can set Y axis fonts and color of labels.
Solution: In CDE, same way set below extension points ,
Arg0: xAxisLabel_font Val0: 13 px Arial
Arg1: xAxisLabel_textStyle Val1: blue
We can set the number of extension point for setting Advance Property of the CCC Component.
Some of the extension points that are suggest by Pentaho Team is as per below
titleLabel
Extension points
Sample Value
Example
Description.
titleLabel_font
20 px serif
Arg0:titleLabel_font
Val0:13 px serif
For change the Title Label fonts , Please note that title will be set by the “Title” Property
titleLabel_fillStyle
blue
Arg0:titleLabel_fillStyle
Val0:blue
-
titleLabel_textAngle
-0.2
Arg0:titleLabel_textAngle
Val0:-0.2
To rotate the title label.
titleLabel_textAlign
left
Arg0:titleLabel_textAlign
Val0: center
To Change the alignment , possible value are
“left” , “center” ,”right”
titleLabel_textBaseline
top
Arg0:titleLabel_textBaseline
Val0:top
Base line of text , possible values are “top” and “bottom”
titleLabel_textStyle
blue
Arg0:titleLabel_textStyle
Val0: blue
To change the color of the text , you can also specify the color code in hexadecimal.
titleLabel_text
-
Arg0:titleLabel_text
Val0:Function(d) { return d.substr(3); }
Use for dynamic Title change, you can include any parameter over here also.
xAxisLabel
Extension points
Sample Value
Example
Description.
xAxisLabel_font
10 px serif
Arg0:xAxisLabel_font
Val0:10 px serif
For change the x axis Label fonts
xAxisLabel_textAngle
-0.2
Arg0: xAxisLabel_textAngle
Val0:-0.8
To rotate the x axis label.
xAxisLabel_textAlign
left
Arg0:xAxisLabel_textAlign
Val0: center
To Change the alignment , possible value are
“left” , “center” ,”right”
xAxisLabel_textBaseline
top
Arg0:xAxisLabel_textBaseline
Val0:top
Base line of text , possible values are “top” and “bottom”
xAxisLabel_textStyle
blue
Arg0:xAxisLabel_textStyle
Val0: blue
To change the color of the text , you can also specify the color code in hexadecimal.
xAxisLabel_text
-
Arg0:xAxisLabel_text
Val0:Function(d) { return d.substr(3); }
Use for dynamic label change , you can include any parameter over here also.
yAxisLabel
Extension points
Sample Value
Example
Description.
yAxisLabel_font
10 px serif
Arg0:yAxisLabel_font
Val0:10 px serif
For change the y axis Label fonts
yAxisLabel_textAngle
-0.2
Arg0: yAxisLabel_textAngle
Val0:-0.8
To rotate the x axis label.
yAxisLabel_textAlign
left
Arg0:yAxisLabel_textAlign
Val0: center
To Change the alignment , possible value are
“left” , “center” ,”right”
yAxisLabel_textBaseline
top
Arg0: yAxisLabel_textBaseline
Val0:top
Base line of text , possible values are “top” and “bottom”
yAxisLabel_textStyle
blue
Arg0: yAxisLabel_textStyle
Val0: blue
To change the color of the text , you can also specify the color code in hexadecimal.
yAxisLabel_text
-
Arg0: yAxisLabel_text
Val0:Function(d) { return d.substr(3); }
Use for dynamic label change , you can include any parameter over here also.
Line Items
Extension points
Sample Value
Example
Description.
xAxis_lineWidth
xAxisRule_lineWidth
yAxis_lineWidth
yAxisRule_lineWidth
0.8
Arg0:xAxis_lineWidth
Val0: 0.8
To change the XAxis Line width and other parallel lines.
To enable rules/grids , go to property and enable
Show xx grid = True
Show yy grid = True
xAxis_fillStyle
xAxisRule_fillStyle
yAxis_fillStyle
yAxisRule_fillStyle
#00df00
blue
Arg0:xAxis_fillStyle
Val0: red
xAxis_strokeStyle
xAxisRule_strokeStyle
yAxis_strokeStyle
yAxisRule_strokeStyle
Red
Arg0:xAxis_fillStyle
Val0: blue
To change the stroke style.
dot Items
Extension points
Sample Value
Example
Description.
dot_fillStyle
dot_shape
dot_shapeRadius
green
square
3
Arg0:dot_fillStyle
Val0: blue
For change the property of dot , in line chart also you can change the dot to square and change the property