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 9156357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:45:29+00:00 2026-06-17T12:45:29+00:00

I am following this example of a difference chart . I’ve added buttons on

  • 0

I am following this example of a difference chart. I’ve added buttons on my page that make ajax calls to fetch new datasets, and then I redraw the difference charts. There are several difference charts on my page.

Upon redrawing, the rendering of the above/below areas becomes corrupted: x-values have both above and below areas rendered. I’m fairly certain it’s not a back-end problem, because the initial load produces a correct chart; changing a parameter messes up the redrawn chart; and going back to the default parameters and redrawing the original chart also produces a corrupted chart. In fact, I can partially make out what’s happening: the original time series is present on the new graph. It’s almost as if there are three series being graphed.

I think it has to do with .datum. I don’t fully understand how it works, since it differs from the standard enter/update/exit methods associated with .data. I’ve read the documentation, but am still confused. Some possibilities:

  1. The original data is hanging around (even though I clean out the container with $('#chart').html(''))
  2. The .append(g) is adding groups without removing the earlier ones.
  3. The svg.append("clipPath").attr("id", "clip-below") is causing problems, since multiple nodes have the same id (even though again, I’m not sure how this could happen since I remove the nodes before the redraw).

I feel like I’m missing a lot of fundamentals here, even though I’ve spent a decent amount of time trying to understand the library. Can anyone see anything obvious, or point out some good resources for me to look at?

UPDATE: This has to do with there being two charts on the page. I noticed this when I opened the inspector and closed it. The areas of the bottom chart (the difference chart) had screwed up, and I noticed the new line that it was using to separate the above-area from the below-area looked a lot like one of the lines from the top chart.

Does anybody have experience with dependency issues/namespace collisions when drawing two charts on the same page?

  • 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-06-17T12:45:30+00:00Added an answer on June 17, 2026 at 12:45 pm

    The problem was, the id’s for the clipping paths were the same.

    I would still like some more resources concerning .datum.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to cakephp and following this tutorial. http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html I have created the blog
I am following this example (First comment), How to create a custom ListView with
I'm following this example for creating a simple Web application using JAX-RS, MongoDB and
I'm following this example: http://www.codinghorror.com/blog/2005/12/getting-started-with-indexing-service.html However, the conversion to dataset shows empty columns for
I am following this example to get JSONP data from remote server. jQuery append
Ideally I want a function something like the following (this example doesn't compile): void
Check this example before reading the question - http://www.sqlfiddle.com/#!2/fcf3e/8 The following data comes from
When I execute this following code for example: cart.php?p=1&action=add <?php session_start(); if (isset($_GET['p']) &&
I tried following the gradle manual with their example like this but copyJars is
Following the example on the RevenDB site , I came up with this: public

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.