Me chamo Ricardo e trabalho com Apex já tem alguns anos, desde quando ele era chamado htmldb,
porém nesta última versão do apex a 4.2.1 estou tento problemas ao gerar gráficos utilizando a biblioteca
AnyChart, eu a utilizo para gerar página Dashboard aqui na empresa, vou postar um código bem simples que
faz com que seja gerado um gráfico em versões anteriores e que nesta versão atual não está funcionando.
segue:
1. XML do gráfico
-----------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<anychart>
<settings>
<animation enabled="True"/>
</settings>
<charts>
<chart plot_type="CategorizedVertical">
<chart_settings>
<title enabled="false"/>
<chart_background enabled="false">
<border enabled="false"/>
<inside_margin all="0"/>
</chart_background>
<axes>
<y_axis>
<scale minimum="0" maximum="50"/>
<minor_grid enabled="false"/>
<major_grid enabled="false"/>
<title enabled="false"/>
<scale mode="Stacked"/>
<labels>
<format>{%Value}{numDecimals:0}</format>
</labels>
</y_axis>
<x_axis>
<zoom enabled="true" allow_drag="false" visible_range="14" end="1" show_scroll_bar="false"/>
<title enabled="false"/>
<major_tickmark enabled="false"/>
</x_axis>
</axes>
</chart_settings>
<data_plot_settings default_series_type="SplineArea">
<!-- <bar_series point_padding="0.0" group_padding="0.5" shape_type="Box">
<bar_style>
<fill opacity="1"/>
<states>
<normal>
<fill color="%Color"/>
<border color="DarkColor(RGB(240,103,59))" thickness="1"/>
</normal>
<hover>
<hatch_fill enabled="true" type="Percent50" color="%Color" opacity="1"/>
</hover>
</states>
</bar_style>
<tooltip_settings enabled="True">
<format>{%SeriesName} - {%Name}={%value}{numDecimals:0}</format>
</tooltip_settings>
<label_settings enabled="true">
<format>{%Value}{numDecimals:0}</format>
<font bold="false"/>
<states>
<hover>
<format>{%Value}{numDecimals:0}</format>
<background enabled="true">
<inside_margin left="4" top="1" right="4" bottom="0"/>
<border type="Solid" color="#494949" opacity="1" thickness="2"/>
</background>
</hover>
</states>
</label_settings>
<interactivity use_hand_cursor="false" allow_select="false"/>
</bar_series> -->
<bar_series group_padding="0.3">
</bar_series>
<line_series>
<line_style>
<line thickness="3"/>
</line_style>
</line_series>
<area_series>
<tooltip_settings enabled="false">
</tooltip_settings>
<area_style>
<line enabled="true" thickness="1" color="DarkColor(%Color)"/>
<fill opacity="0.7"/>
<states>
<hover>
<fill opacity="0.9"/>
<hatch_fill enabled="true" type="Solid" opacity="0.2"/>
</hover>
</states>
</area_style>
</area_series>
</data_plot_settings>
<data>
<series name="faixaStatus0" color="LightColor(rgb(237,28,36))">
<point name="01/fev" y="50" />
<point name="01/jan" y="50" />
<point name="01/dez" y="50" />
<point name="01/nov" y="50" />
<point name="01/out" y="50" />
<point name="01/set" y="50" />
<point name="01/ago" y="50" />
<point name="01/jul" y="50" />
<point name="01/jun" y="50" />
<point name="01/mai" y="50" />
<point name="01/abr" y="50" />
<point name="01/mar" y="50" />
<point name="01/fev" y="50" />
<point name="01/jan" y="50" />
</series>
<series name="faixaStatus1" color="LightColor(rgb(255,242,0))">
<point name="01/fev" y="40" />
<point name="01/jan" y="40" />
<point name="01/dez" y="40" />
<point name="01/nov" y="40" />
<point name="01/out" y="40" />
<point name="01/set" y="40" />
<point name="01/ago" y="40" />
<point name="01/jul" y="40" />
<point name="01/jun" y="40" />
<point name="01/mai" y="40" />
<point name="01/abr" y="40" />
<point name="01/mar" y="40" />
<point name="01/fev" y="40" />
<point name="01/jan" y="40" />
</series>
<series name="faixaStatus2" color="LightColor(rgb(34,177,76))">
<point name="01/fev" y="30" />
<point name="01/jan" y="30" />
<point name="01/dez" y="30" />
<point name="01/nov" y="30" />
<point name="01/out" y="30" />
<point name="01/set" y="30" />
<point name="01/ago" y="30" />
<point name="01/jul" y="30" />
<point name="01/jun" y="30" />
<point name="01/mai" y="30" />
<point name="01/abr" y="30" />
<point name="01/mar" y="30" />
<point name="01/fev" y="30" />
<point name="01/jan" y="30" />
</series>
<series name="Real" type="Bar" color="RGB(240,103,59)">
<tooltip enabled="true">
<format>
Real: {%Value}{numDecimals:2}
</format>
</tooltip>
<point name="01/fev" y="0" />
<point name="01/jan" y="0" />
<point name="01/dez" y="0" />
<point name="01/nov" y="0" />
<point name="01/out" y="0" />
<point name="01/set" y="0" />
<point name="01/ago" y="0" />
<point name="01/jul" y="21.70947864988055754221447774269084029893" />
<point name="01/jun" y="19.18129702977094900816557600214880293908" />
<point name="01/mai" y="19.36814692786311312977975975225563654571" />
<point name="01/abr" y="26.7870586822692606322501393855191000009" />
<point name="01/mar" y="0" />
<point name="01/fev" y="0" />
<point name="01/jan" y="0" />
</series>
<series name="Meta" type="Line" color="Rgb(28,137,206)">
<tooltip enabled="true">
<format>
Meta: {%Value}{numDecimals:2}
</format>
</tooltip>
<point name="01/fev" y="25" />
<point name="01/jan" y="25" />
<point name="01/dez" y="25" />
<point name="01/nov" y="25" />
<point name="01/out" y="25" />
<point name="01/set" y="25" />
<point name="01/ago" y="25" />
<point name="01/jul" y="25" />
<point name="01/jun" y="25" />
<point name="01/mai" y="25" />
<point name="01/abr" y="25" />
<point name="01/mar" y="25" />
<point name="01/fev" y="25" />
<point name="01/jan" y="25" />
</series>
</data>
</chart>
</charts>
</anychart>
invocação do JS tal como está
<script type="text/javascript" language="javascript" src="/i/flashchart/anychart_5/js/AnyChart.js">
3. Código fonte que plota o gráfico na tela
var chart = new AnyChart('/i/flashchart/anychart_5/swf/anychart.swf');
chart.setData(retobj('P2000_X').value); -- aqui o XML esta em uma textarea
chart.width = "400";
chart.height = "400";
chart.write();
4. Configuração do DADS.CONF
Alias /i/ "/backup2/apex/images/"
<Location /apex>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlDatabaseConnectString servvmdb02.cs.localdomain:1521:cstest ServiceNameFormat
PlsqlNLSLanguage 'BRAZILIAN PORTUGUESE_BRAZIL.AL32UTF8'
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDefaultPage apex
PlsqlDatabasePassword 1123455@434345GFDHJFg==
PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
PlsqlUploadAsLongRaw *
Allow from all
</Location>
Desde já agradeço