Databases Reference
In-Depth Information
The chart JavaScript object we defined on the page level. The above code initiates a new
AnyChart chart. The object can have different properties and events; in this case we used
the width and height to define that at runtime based on the value in the page item. The
setdata event gives the XML it finds in P7_CHART_XML to the chart and finally the write
event will write the chart to the div.
Warning Make sure you adapt the code to use your item names. For example, if you are on page 1 in the
Dynamic Action you probably want to use P1_CHART_WIDTH.
Running the page gives the result as shown in Figure 2-64.
Figure 2-64. A chart manually created with JavaScript
You also want to change the tooltip of Series 2 to have a custom message. To achieve that, follow
these steps:
Edit the Dynamic Action “Load Chart” - “Set Value” in the True Action. Replace the
existing SQL statement of Series 2 with the following code:
SELECT xmlelement("series", xmlattributes('Series 2' AS "name", 'extra_y_axis_1' AS
"y_axis"), xmlagg( xmlelement("point", xmlattributes(ename AS "name", nvl(comm,0) AS "y"),
Search WWH ::




Custom Search