Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

"Step by step" Bar Chart Rendering

Hi all,

I am using Google chart to render a bar chart.  Say I have 12 months in Dimension (e.g. Jan-2014, Feb-2014, ..., Dec-2014) and the total sum of sales amount of each month in Expression.

Now I would like to to display the months (and their sales amounts) one after another (in order to simulate an animation).  The following are what I have written in Script.js in an extension:

function googleCoreChartLoaded() {

Qva.AddExtension('CVL', AutoPlay);

}

function AutoPlay()

{

            […]

                                    myChart = new google.visualization.BarChart(this.Element)

                                    google.visualization.events.addListener(myChart, 'ready', sleep);

           

                                    myChart.draw(view, options);

            […]

}

function sleep()

{

var start = new Date().getTime();

for (var i = 0; i < 1e7; i++)

{

if ((new Date().getTime() - start) > 1000)

{

                        break;

            }

            }

}



My problem is that, instead of showing the months (and their relevant sales amounts) one after another, only the last month (Dec-2014) is displayed on Qlikview (in Webview mode) after the above script has been executed.


Can anyone tell me what I have done incorrectly?


Thank you so much for your help!


Labels (1)
0 Replies