@php if(isset($graph) && isset($graph['result'])){ $data = json_encode($graph['result']['report_data']); $chart_config = json_decode($graph['result']['chart_config'],true); if(isset($chart_config['animation'])) $animation = $chart_config['animation']; else $animation = "3d"; $theme = $chart_config['theme']; $width = '100%'; $height = '100%'; $graph_type = $graph['result']['report_type'].$animation; $graph_id = 'build-graph'.rand(); } @endphp @if(isset($graph_id))
FusionCharts XT will load here!
@endif @php if(isset($graph) && isset($graph['result'])){ $div_id = "chart-container".$graph_id; $barChart = new FusionCharts($graph_type, $graph_id, $width, $height, $div_id, "json", ' { "chart": { "id":"'.$graph_id.'", "caption":"'.$chart_config['caption'].'", "numberSuffix": "'.$chart_config['numberSuffix'].'", "useplotgradientcolor": "0", "plotBorderAlpha": "0", "bgColor": "#FFFFFFF", "canvasBgColor": "#FFFFFF", "showValues":"1", "showCanvasBorder": "0", "showBorder": "0", "divLineColor": "#DCDCDC", "alternateHGridColor": "#DCDCDC", "labelDisplay": "auto", "baseFont": "Assistant", "baseFontColor": "#153957", "outCnvBaseFont": "Assistant", "outCnvBaseFontColor": "#8A8A8A", "baseFontSize": "13", "outCnvBaseFontSize": "13", "yAxisMinValue":"40", "labelFontColor": "#8A8A8A", "captionFontColor": "#153957", "captionFontBold": "1", "captionFontSize": "20", "subCaptionFontColor": "#153957", "subCaptionfontSize": "17", "subCaptionFontBold": "0", "captionPadding": "20", "valueFontBold": "0", "showAxisLines": "1", "yAxisLineColor": "#DCDCDC", "xAxisLineColor": "#DCDCDC", "xAxisLineAlpha": "15", "yAxisLineAlpha": "15", "toolTipPadding": "7", "toolTipBorderColor": "#DCDCDC", "toolTipBorderThickness": "0", "toolTipBorderRadius": "2", "showShadow": "0", "theme": "'.$theme.'" }, "data": '.$data.' }'); $barChart->render(); } @endphp