Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 807809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:27:43+00:00 2026-05-15T00:27:43+00:00

Sparklines are awesome for doing little inline graphs. However, if the container they are

  • 0

Sparklines are awesome for doing little inline graphs. However, if the container they are in is hidden, you can’t simply draw them behind the scenes and then show them. You must first display the container and then call the $.sparkline_display_visible method.

This is ok, except that it’s really slow if you have a lot of graphs. I have a little over 200 graphs (and will eventually scale to more) to render and it takes around 4000ms to render them all, hanging the browser. Does anyone know how to either speed up this process (doubtful) or improve perceived performance by not hanging the browser? I tried to add a timer so each graph would show up one at a time while being rendered, but that still takes a while with 200+ graphs and the effect is a bit distracting to the user.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:27:43+00:00Added an answer on May 15, 2026 at 12:27 am

    You could have the plugin render the graph for the ones that are visible on load then loop through the hidden ones and have it render those in groups of 10. Will make it so the browser doesn’t hang and will “pre-render” the hidden ones before you need them.

    var sparklines = $('.inlinesparkline').sparkline();
    var hidden = sparklines.parent().filter(':hidden').addClass('needsSparkline');
    
    (function loopy(){
        var objs = hidden.filter(':lt(10)').removeClass('needsSparkline');
        hidden = hidden.filter('.needsSparkline');
        if (objs.length) {
            objs.css({
                'display':'',
                'visibility':'hidden'
            });
            $.sparkline_display_visible();
            objs.css({
                'display':'none',
                'visibility':''
            });
            hidden.length && setTimeout( loopy, 250 );
        }
    })();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create sparklines that illustrate the number of posts created on my
Hey guys. Just wondering if anyone knows of a method to create sparkline graphs
I want to know if it possible to repoduce the idea of Excel 2010
I need to set a single property in a jQuery command using a value
Hola! I have an issue I thought I would throw out to the S.O.
I've written an SQL query that tells me the names of the previous week's
I used jQuery sparkline ( http://omnipotent.net/jquery.sparkline/ ) in a page. This gives me problem
Ordinarily I wouldn't just post an error message on SO, but after a Google
I am developing a rails application where I need a success rate system similar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.