rgundersen Posted November 21, 2013 Report Share Posted November 21, 2013 Hi When my page loads, for a split-second the chart shows random/sample data before my 'real' data is loaded. Can I turn this off? Thanks Quote Link to comment Share on other sites More sharing options...
0 JuanC Posted November 22, 2013 Report Share Posted November 22, 2013 Can you reproduce this in all browsers? Do you have a sample page where we can try to reproduce the same issue? JuanC Quote Link to comment Share on other sites More sharing options...
0 rgundersen Posted November 25, 2013 Author Report Share Posted November 25, 2013 Sure, this example built up using the 'Getting Started' guide seems to exhibit the same behaviour: <head> <link rel="stylesheet" type="text/css" href="styles/chartfx.css" /> <script type="text/javascript" src="js/jchartfx.system.js"></script> <script type="text/javascript" src="js/jchartfx.coreVector.js"></script> <script type="text/javascript" language="javascript"> var chart1; function loadChart() { chart1 = new cfx.Chart(); chart1.getData().setSeries(2); chart1.getAxisY().setMin(500); chart1.getAxisY().setMax(2000); var series1 = chart1.getSeries().getItem(0); var series2 = chart1.getSeries().getItem(1); series1.setGallery(cfx.Gallery.Lines); series2.setGallery(cfx.Gallery.Bar); var divHolder = document.getElementById('ChartDiv'); chart1.create(divHolder); var data = [ { "Month": "Jan", "Bikes": 1800, "Parts": 1300 }, { "Month": "Feb", "Bikes": 1760, "Parts": 900 }, { "Month": "Mar", "Bikes": 1740, "Parts": 970 }, { "Month": "Apr", "Bikes": 1750, "Parts": 1010}, { "Month": "May", "Bikes": 1810, "Parts": 1070 }, { "Month": "Jun", "Bikes": 1920, "Parts": 1180 } ]; chart1.setDataSource(data); } </script> </head> <body onload="loadChart()"> <div id="ChartDiv" style="width:600px;height:400px;display:inline-block"></div> </body> It does load the data correctly, but just before it does, it displays some random-looking data with two generic series (Series 1 & Series 2). I've got some screenshots that I quickly grabbed as it was loading if you want me to send them somewhere. Every time I reload the page, the 'random' data is different. This is using IE9, Chrome and Firefox. I'm using jChartFX version 7.1.5044. Thanks! Quote Link to comment Share on other sites More sharing options...
0 JuanC Posted December 2, 2013 Report Share Posted December 2, 2013 Please try setting the chart's data before the chart.create call. Regards, JuanC Quote Link to comment Share on other sites More sharing options...
0 rgundersen Posted December 2, 2013 Author Report Share Posted December 2, 2013 That worked, thanks! Quote Link to comment Share on other sites More sharing options...
Question
rgundersen
Hi
When my page loads, for a split-second the chart shows random/sample data before my 'real' data is loaded.
Can I turn this off?
Thanks
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.