0 Replies Latest reply: Jan 15, 2014 4:03 PM by 9ab3256b-d8ca-4a0a-9a9a-e37d01668fe6 RSS

    Anychart - turn off blue border

    9ab3256b-d8ca-4a0a-9a9a-e37d01668fe6

      Hi,

      I'm plotting using AnyChart and have edited the XML to turn off the blue boarder.  I must not be getting it in all the right locations b/c it still prints.  Any suggestions whats not correct?

       

      Function:

      create or replace function "GET_MAP_DATA"

      return CLOB

      is

          l_xml               clob;

          l_result            clob;

          l_map_data_xml      varchar2(32767);

          l_map_xml_part1     varchar2(32767);         

          l_map_xml_part2     varchar2(32767);

      begin

        

          dbms_lob.createtemporary( l_xml, FALSE, dbms_lob.session );

          dbms_lob.open( l_xml, dbms_lob.lob_readwrite );

        

          l_map_xml_part1 := '<?xml version = "1.0" encoding="utf-8" standalone = "yes"?>'||chr(10)||

      '<anychart>'||chr(10)||

      '  <settings>'||chr(10)||

      '    <animation enabled="false"/>'||chr(10)||

      '  </settings>'||chr(10)||

      '  <margin left="0" top="0" right="0" bottom="0" />'||chr(10)||

      '  <charts>'||chr(10)||

      '    <chart plot_type="Map" name="chart_7727132707795235942"> '||chr(10)||

      '      <palettes>'||chr(10)||

      '        <palette name="undefPalette">'||chr(10)||

      '          <item color="0xC9DEA4" />'||chr(10)||

      '          <item color="0xC9DEA4" />'||chr(10)||

      '          <item color="0xC9DEA4" />'||chr(10)||

      '          <item color="0xC9DEA4" />'||chr(10)||

      '          <item color="0xCEE1AB" />'||chr(10)||

      '          <item color="0xCEE1AB" />'||chr(10)||

      '          <item color="0xC9DEA4" />'||chr(10)||

      '          <item color="0xC9DEA4" />'||chr(10)||

      '          <item color="0xC9DEA4" />'||chr(10)||

      '          <item color="0xB7D28A" />'||chr(10)||

      '          <item color="0xA4C671" />'||chr(10)||

      '          <item color="0x98BE5F" />'||chr(10)||

      '          <item color="0x8EB851" />'||chr(10)||

      '          <item color="0xC9DEA4" />'||chr(10)||

      '          <item color="0xC9DEA4" />'||chr(10)||

      '        </palette>'||chr(10)||

      '      </palettes>'||chr(10)||

      '      <chart_settings>'||chr(10)||

      '        <title enabled="False" />'||chr(10)||

      '        <data_plot_background>'||chr(10)||

      '          <fill type="Solid" color="0xffffff" opacity="0" />'||chr(10)||

      '          <border enabled="False"/>'||chr(10)||

      '          <corners type="Square"/>'||chr(10)||

      '        </data_plot_background>'||chr(10)||

      '        <controls>'||chr(10)||

      '          <navigation_panel enabled="false"/>'||chr(10)||

      '          <zoom_panel enabled="false"/>'||chr(10)||

      '        </controls>'||chr(10)||

      '      </chart_settings>'||chr(10)||

      '      <data_plot_settings enable_3d_mode="false">'||chr(10)||

      '        <map_series source="usa/country/states.amap" id_column="REGION_NAME" labels_display_mode="RegionBounds">'||chr(10)||

      '         <projection type="orthographic"  />'||chr(10)||

      '         <undefined_map_region palette="undefPalette">'||chr(10)||

      '           <interactivity hoverable="True" use_hand_cursor="False" allow_select="False"/>'||chr(10)||

      '         </undefined_map_region>'||chr(10)||

      '          <grid enabled="true">'||chr(10)||

      '            <parallels enabled="false"/>'||chr(10)||

      '            <meridians enabled="false"/>'||chr(10)||

      '            <background>'||chr(10)||

      '          <fill type="Solid" color="0xFFFFFF" />'||chr(10)||

      '          <border enabled="False"/>'||chr(10)||

      '          <corners type="Square"/>'||chr(10)||

      '            </background>'||chr(10)||

      '          </grid>'||chr(10)||

      '        </map_series>'||chr(10)||

      '        <marker_series>'||chr(10)||

      '          <marker_style marker_type="Circle">'||chr(10)||

      '            <marker />'||chr(10)||

      '            <effects>'||chr(10)||

      '              <drop_shadow enabled="false"/>'||chr(10)||

      '            </effects>'||chr(10)||

      '          </marker_style>'||chr(10)||

      '          <tooltip_settings enabled="true">'||chr(10)||

      '            <format><![CDATA[{%Name}{enabled:False} '||chr(10)||' {%value1}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>'||chr(10)||

      '            <font family="Tachoma" size="10" color="0x000000" />'||chr(10)||

      '              <position anchor="Float" valign="Top" padding="0" /> '||chr(10)||

      '          </tooltip_settings>'||chr(10)||

      '          <label_settings enabled="true" mode="Outside" multi_line_align="Center">'||chr(10)||

      '            <format><![CDATA[{%Name}{enabled:False} '||chr(10)||' {%value1}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>'||chr(10)||

      '            <background enabled="false"/>'||chr(10)||

      '            <font family="Arial" size="10" color="0x000000" />'||chr(10)||

      '          </label_settings>'||chr(10)||

      '        </marker_series>'||chr(10)||

      '      </data_plot_settings>'||chr(10);

        

          dbms_lob.writeappend( l_xml, length(l_map_xml_part1), l_map_xml_part1);

       

        

          l_map_data_xml := '      <data>'||chr(10);

          dbms_lob.writeappend( l_xml, length(l_map_data_xml), l_map_data_xml);

       

          -- Series 1

          l_map_data_xml := '        <series name="City" type="Marker" palette="Default">'||chr(10);

          dbms_lob.writeappend( l_xml, length(l_map_data_xml), l_map_data_xml);

       

          -- Loop through series data

          for c1 in (

              SELECT 'San Francisco' country,'-122.821673525377' centroid_x,'37.8710562414266' centroid_y, 'DR Data Center' txt FROM DUAL

              union all

              SELECT 'Hartford'      country,'-72.6743' centroid_x,'41.7627' centroid_y, 'Legacy Data Center' txt FROM DUAL

              union all

              SELECT 'Tampa'      country,'-82.4650' centroid_x,'27.9710' centroid_y,'New Data Center' txt FROM DUAL

          )

          loop

              l_map_data_xml := '          <point name="'||c1.country||'" ';

              l_map_data_xml := l_map_data_xml||' x="'||c1.centroid_x||'" y="'||c1.centroid_y||'" >';

              l_map_data_xml := l_map_data_xml||chr(10)||'          <attributes>'||chr(10)||

                                                             '            <attribute name="value1">'||c1.txt||'</attribute>'||

                                                             '          </attributes>'||chr(10)||'          </point>'||chr(10);

              dbms_lob.writeappend( l_xml, length(l_map_data_xml), l_map_data_xml);

          end loop;

       

          l_map_data_xml := '        </series>'||chr(10)||'  </data>';

          dbms_lob.writeappend( l_xml, length(l_map_data_xml), l_map_data_xml);

       

          l_map_data_xml := wwv_flow.do_substitutions(wwv_flow_utilities.clob_to_varchar2(l_xml));

        

          l_map_xml_part2 := '    </chart>'||chr(10)||

      '  </charts>'||chr(10)||

      '</anychart>';

        

          dbms_lob.writeappend( l_xml, length(l_map_xml_part2), l_map_xml_part2);

        

          l_result := l_xml;

          dbms_lob.close(l_xml);

        

          return l_xml;

      exception when others then

        raise;

      end;

       

      PL/SQL in Apex page:

      declare

        l_amt    binary_integer := 8000;

        l_pos    PLS_INTEGER := 1;

        l_len    number;

        l_buffer varchar2(8000);

        l_clob   clob;

      begin

       

          /* Textarea holding map XML */

          htp.p('<textarea cols="65" rows="17" id="rowData" style="display:none;">');

       

          l_clob := get_map_data;

          dbms_lob.open(l_clob, dbms_lob.lob_readonly);

          l_len  := dbms_lob.getlength (l_clob);

       

          while l_len > 0 loop

       

       

              dbms_lob.read(l_clob, l_amt, l_pos, l_buffer);

              if l_buffer is not null then

                  sys.htp.prn(l_buffer);

              end if;

              l_pos := l_pos + l_amt;

              l_len := l_len - l_amt;

          end loop;

       

       

          dbms_lob.close(l_clob);

          sys.htp.p('</textarea>');

       

       

          /* Map Region */

          sys.htp.p('<div id="chartDiv"></div>');

       

          sys.htp.p(

            '<script type="text/javascript" src="#IMAGE_PREFIX#libraries/apex/minified/widget.chart.min.js?v=4.2.1.00.08"></script>' || chr(10) ||

            '<script type="text/javascript" src="#IMAGE_PREFIX#flashchart/anychart_6/js/AnyChart.js"></script>' || chr(10) ||

            /* NOTE: it is only necessary to include AnyChartHTML5.js for charts you wish to render as HTML5.  Currently there is no HTML5 support for maps */

            '<script type="text/javascript" src="#IMAGE_PREFIX#flashchart/anychart_6/js/AnyChartHTML5.js"></script>' || chr(10) ||

            '<script type="text/javascript" language="javascript">' || chr(10) ||

            'AnyChart.useBrowserResize = true;'|| chr(10)||

            'AnyChart.renderingType = anychart.RenderingType.FLASH_PREFERRED;'|| chr(10)||

            'AnyChart.swfFile = ''#IMAGE_PREFIX#flashchart/anychart_6/swf/OracleAnyChart.swf'';' || chr(10) ||

            'var chart = new AnyChart( AnyChart.swfFile );' || chr(10) ||

            'chart.width="500";' || chr(10) ||

            'chart.height="400";' || chr(10) ||

            'var data = $v(''rowData'').toString();' || chr(10) ||

            'chart.setData(data);' || chr(10) ||

            'chart.write("chartDiv");' || chr(10) ||

            '</script>');

       

      end;

       

       

      Thanks