0 Replies Latest reply on Dec 5, 2013 9:23 AM by gladams

    Fusion Charts in Web Direct

    gladams

      I managed to get Fusioncharts to work perfectly in web direct with the flash version by putting the charts folder on a separate website and in the putting the calculation in the web viewer as a global variable. For example:

       

      $$Url =

      "http://www.xxx.com/Charts/FusionCharts.html?v=3

      &sep=;&chart=[chartType=" & Global_U01::gChartStackedType & ";chartWidth=" & Global_U01::gChartWidth & ";chartHeight=" & Global_U01::gChartHeight & "]

      &chartParams=[caption=" & ConceptDesign_P01::gCaption & ";subCaption=" & ConceptDesign_P01::SubCaption & ";

      xAxisName="&$xTitle&";yAxisName=Amount;pieSliceDepth=20;useRoundEdges=1;formatNumberScale=1;

      showValues=" & ConceptDesign_P01::gChart_ShowValues & ";decimals=2;" & ConceptDesign_P01::gGraphUnits & ";palette=" & Global_U01::gPalette & ";bgColor=ccffcc;bgAlpha=100;

      borderthickness=1;showBorder=1;borderColor=ffffff]

      &labels=" & $Hlabel & "Total" &

      $AllData

       

      However I have now moved over the the html5 Fusioncharts which are more versitile and can be used with iPad. When I do the same with this it works fine in FileMaker Pro but does not work in web direct. An example is below:

       

      $$Url =

      If ( IsEmpty ( $$BomData ) ; "" ;
      "data:text/html,<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <title>Graphs Using JavaScript</title>
      <script type="text/javascript" src=""
      &
      "http://www.xxx.com/FusionCharts/FusionCharts.js"></script>
      </head>
      <body>
      <div id="chartContainer">FusionCharts XT will load here!</div>

      <script type="text/javascript"><!--¶

      FusionCharts.setCurrentRenderer('javascript');

      var myChart = new FusionCharts("" & Global_U01::gChartStackedType & ".swf","
      & " "Chart1Id", "" & ProgramConceptRecord_P01::ChartWidthBom & "", "" & ProgramConceptRecord_P01::ChartHeightBom & "", "0", "1"); "
      & "myChart.setXMLData("<chart caption='" & ProgramConceptRecord_P01::gCaption
      & "' xAxisName='" & $$xTitle & "' yAxisName='"
      & Global_U01::gChartName & "'"
      & " showValues='" & ProgramConceptRecord_P01::gChart_ShowValues & "'"
      & " rotateValues='" & ProgramConceptRecord_P01::gChart_RotateValues & "'"
      & " useRoundEdges='" & ProgramConceptRecord_P01::gChart_Corners & "'"
      & " showSum='" & ProgramConceptRecord_P01::gChart_InsideValues & "'"
      & " palette='" & Global_U01::gPalette & "'"
      & " " & ProgramConceptRecord_P01::gGraphUnits
      & " subCaption='" & ProgramConceptRecord_P01::SubCaption & "'>"
      & $$BomData
      & "</chart>");
      myChart.render("chartContainer");
      // -->
      </script> "

      & "</body> </html>"
      )

       

      Does anybody have any suggestions why the above javascript wouldn't work in web direct?