Hello.
Fusion in a flash chart to bring up the charts were created.
However, the chart type ScrollColumn2D Bring more than once when a chart is not drawn.
1. Load ScrollColumn2D chart
2. remove chart object
3. Load ScrollColumn2D chart AGAIN! <- problem
CODE.
import flash.display.MovieClip;
import flash.events.MouseEvent;
import com.fusioncharts.components.FusionCharts;
// ---
var $container :MovieClip = new MovieClip();
addChild($container);
// ---
btnLoadChart.addEventListener(MouseEvent.MOUSE_UP, handlerLoadChart);
// ---
function handlerLoadChart(e:MouseEvent):void
{
// remove previous charts all
while ($container.numChildren > 0) {
$container.removeChildAt(0);
}
// create a new chart #1
var chart1 :FusionCharts = new FusionCharts();
chart1.FCDebugMode = true;
chart1.FCFolder = "fusioncharts";
chart1.FCChartType = "ScrollColumn2D";// <-
chart1.FCDataURL = "data.xml";
chart1.FCChartWidth = 530;
chart1.FCChartHeight = 360;
chart1.FCRender();
chart1.x = 10;
chart1.y = 10;
$container.addChild(chart1);
// create a new chart #2
var chart2 :FusionCharts = new FusionCharts();
chart2.FCDebugMode = true;
chart2.FCFolder = "fusioncharts";
chart2.FCChartType = "ScrollColumn2D";// <-
chart2.FCDataURL = "data.xml";
chart2.FCChartWidth = 530;
chart2.FCChartHeight = 360;
chart2.FCRender();
chart2.x = 570;
chart2.y = 10;
$container.addChild(chart2);
}
test-sample.zip