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

  • Home
  • SEARCH
  • 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 8844207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:25:42+00:00 2026-06-14T11:25:42+00:00

I have sample code for question here: http://jsfiddle.net/MuydK/ The problem relates to legend title

  • 0

I have sample code for question here: http://jsfiddle.net/MuydK/

The problem relates to legend title in the key under chart are changing after I have drilled in and out.

They should stay as
“actual” and
“target”
And are changing to “series 1” and “series 2”.

$(function () {
    var chart;
    $(document).ready(function () {
        var colors = Highcharts.getOptions().colors,
        categories1 = ['1011', '1112', '1213', '1415'],
        name1 = 'Actual',

I think I may be missing something in drilldown configuration or setChart code?
I got the same problem with a couple if charts based on code posted above.

Many 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-06-14T11:25:43+00:00Added an answer on June 14, 2026 at 11:25 am

    Edit2: The problem is in your else statement in the function bellow.

    click: function() {
        var drilldown = this.drilldown;
        if (drilldown) { // drill down
            setChart(drilldown.name, drilldown.categories, [drilldown.data], drilldown.color);
        } else { // restore
            setChart(name, categories1, [data1, data2], 'white');
        }
    }​
    

    Instead get rid of name1 = 'Actual' and only have data1 and data2 and add name and color to them then you could do like this instead

    click: function() {
        var drilldown = this.drilldown;
        if (drilldown) { // drill down
            chart.xAxis[0].setCategories(drilldown.categories);
            setChart([drilldown.data]);
        } else { // restore
            chart.xAxis[0].setCategories(categories);
            setChart([data1, data2]);
        }
    }
    
    // add code for removing series
    chart.addSeries({
        data
    });​
    

    I hope you understand, but it will be easier if you build data1/2as a highcharts object, and just add the drilldown part to it. So you can change;

    series: [{
        name: name1,
        data: data1,
        color: colors[0]},
    {
        name: name2,
        data: data2,
        color: colors[1]}],
    

    to:

    series: [data1, data2],​
    

    Edit: When you are doing operations bellow you should not set redraw to true, it will be much faster. The same goes for adding the series. You do not need to call chart.redraw() until you have removed and added the charts. And removing stuff is easier backwards. So change:

    while (chart.series.length > 0) {
        chart.series[0].remove(true);
    }
    

    To

    for (var i = chart.series.length; i >= 0; i--){
        chart.series[i].remove(false);
    }
    // add series with redraw == false
    chart.redraw();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fiddle here: http://jsfiddle.net/justinboyd101/4nrbb/ Here is my question: Why are my console.log
Here is a fiddle: http://jsfiddle.net/5s7vv/ What I want to do is have 2 buttons
My question is simple. First off, take a look at this code: http://jsfiddle.net/Jk8Nr/ All
I have -- what I think -- is a simple question. Here's my code:
I have downloaded sample code from Apple Center.I also have gone through following question:
i have this simple question please. I have this part of code which sets
Question simple and quick: I have started to use Netbeans to write some code
The question is simple, can I have the java source code (e.g. FooParser.java) generated
Does anyone have sample code, or a tutorial which demonstrates how to use Grappa
I have a sample code: $text = 240 x 400 pixels, 3.0 inches (~155

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.