This content has been marked as final. Show 7 replies
I have done something similar, hope it helps...
I have a stats page which builds its chart dynamically, date ranges can be entered as parameters along with All Offices or an individual office.
The source of the chart is a pl/sql package function returning VARCHAR2
Series Name - Series 1
Query - RETURN my_stats_pkg.my_chart_sql;
You then build the SQL in the PL/SQL, I return something similar to the following
, MAX(DECODE(ao.area_office_id,1,s.lpid_count,0)) Ayr ,MAX(DECODE(ao.area_office_id,2,s.lpid_count,0)) series1
,MAX(DECODE(ao.area_office_id,3,s.lpid_count,0)) Dumfries ,MAX(DECODE(ao.area_office_id,4,s.lpid_count,0)) series2
,MAX(DECODE(ao.area_office_id,5,s.lpid_count,0)) Galashiels ,MAX(DECODE(ao.area_office_id,6,s.lpid_count,0)) series3
,MAX(DECODE(ao.area_office_id,7,s.lpid_count,0)) Hamilton ,MAX(DECODE(ao.area_office_id,8,s.lpid_count,0)) series4
FROM lpis_statistic s
WHERE s.wh_control_id = wc.wh_control_id
AND s.area_office_id = ao.area_office_id
AND s.measurement_id = m.measurement_id
AND m.measurement_num = 2
AND wc.wh_day = 1
GROUP BY wc.wh_date
ORDER BY wc.wh_date
Thanks but no matter how I structure the chart series - SQL Query or Function Returning SQL Query, the error or no results occurs.
Interesting find this morning. If I change the query and do 'select SUBSTR(d.location_name,1,1) as location...' a chart shows up. Anything beyond 1 character, I receive the error or a blank chart. I remained stumped.
When you run the page with Debug set to "Yes", and click on the "Show XML" link under your chart, what information do you see when you click the link? If there are no issues, generally you should expect to see the complete XML for your chart. However, if an error is reported during the rendering, it should be captured there.
Would you mind putting a testcase up on apex.oracle.com, and updating this thread with the necessary login credentials, so that I can take a closer look?
This is what I see when clicking on "Show XML."
This page contains the following errors:
error on line 56 at column 24: Char 0x0 out of allowed range
Below is a rendering of the page up to the first error.
Would you mind placing a testcase on apex.oracle.com, and updating this thread with the login credentials, please?
I solved this. Some special character in the data. I used:
and the chart displays correctly. Your idea to debug and look at XML got me pointed in the right direction. Thanks.