How to: |
The trendline properties draw a trendline and equation label in bubble and scatter charts.
Note: You can also draw a trendline for an individual series, For information, see Series-Specific Properties.
The following code shows the properties and default values for the trendline:
"trendline": { "enabled": false, "mode": "undefined", "lineStyle": { "width": 1, "color": "black", "dash": "" }, "equationLabel": { "visible": false, "font": "8pt Sans-Serif", "color": "black", "mode": "equation" } }
"trendline": { "enabled": boolean, "mode": "string" "lineStyle": { "width": number, "color": "string", "dash": "string" }, "equationLabel": { "visible": boolean, "font": "string", "color": "string", "mode": "string" } }
where:
Enables or disables the trendline. Valid values are:
Is string that defines the trendline mode (the type of equation used to generate the trendline). Valid values are:
Is a number that defines the width of the trendline in pixels. The default value is 1.
Is a color defined by a color name or numeric specification string that defines the color of the trendline. The default value is "black".
Is a string that defines the dash style of the trendline. Use a string of numbers that defines the width of a dash followed by the width of the gap between dashes (for example, dash: "1 1" draws a dotted line). The default value is "", which draws a solid line.
Controls the visibility of the equation label. Valid values are:
Is a string that defines the size, style, and, typeface of the equation label. The default value is "8pt Sans-Serif".
Is a color for the equation label defined by a color name or numeric specification string. The default value is "black".
Is a string that defines the equation label mode. Valid values are;
The following request generates a bubble chart and defines a linear trendline that is a red dashed line and has a green equation label that shows the correlation coefficient:
GRAPH FILE WF_RETAIL_LITE
SUM REVENUE_US MSRP_US DISCOUNT_US
BY PRODUCT_CATEGORY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH BUBBLE
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
*GRAPH_JS
"trendline": {
"enabled": true, "mode": "linear",
"lineStyle": {"width": 2, "color": "red", "dash": "2 4"},
"equationLabel": {
"visible": true, "font": "bold 12pt Sans-Serif",
"color": "green", "mode": "r"}}
*END
ENDSTYLE
END
The output is:
WebFOCUS | |
Feedback |