Bug in Apex 4 when defining custom flash chart colors.August 24, 2012 at 11:37 am | Posted in Oracle Application Express (Apex), Oracle Developement | Leave a comment
Tags: apex, application express, bug, colors, oracle
In Apex 4.1.1, when you specify custom colors in a Flash chart, and the custom color list contains blank spaces, Apex interprets these blanks into the %20 html character code. This is evident in the XML when viewed in debug mode.
I defined two custom colors with a blank space “RED, GREEN”, and the color inserted into the chart’s XML is “RED,%20GREEN”. Further, instead of parsing out the two colors, Apex thinks it is a single color name. Since the color name “RED,%20GREEN” does not exist, black is substituted.
Now if you define a long string of custom colors, you will end up with a long single color name:
Of course apex/anycharts cannot handle that, therefore the resulting ORA-06502 error when trying to edit the chart.
I have tested this against Apex 3.1.2, and have not encountered the problem.
In order to reproduce the problem do the following:
- Create a new chart region with a 2D Line charts (other chart types may work as well, but i haven’t tested it).
- For the chart series you can use anything, even “select null, 1, 1 from dual”
- Change the Color Scheme to Custom
- In the Custom Colors box add a list of more than ten colors with blank spaces after each comma. For example:#5D88F5, #E31DE3
- Run the chart
- Click the debug button
- Click the Show XML link.
- Note the color name in the series definition.
- Repeat, and in step 4 use a large number of colors:
, #20FAFA, #54DEA0, #26A339, #CCE63A, #F9FF47, #D6913C, #E06421, #E65959, #BFA0BF, #2A450C
- The chart will fail completely, and will become uneditable. You’ll have to delete the chart region and start from scratch.
Update: This issue has been logged as a bug with Oracle.