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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:46:43+00:00 2026-05-26T23:46:43+00:00

I have a highchart and I simply want to remove a bar from it.

  • 0

I have a highchart and I simply want to remove a bar from it. Sounds simple, but the remove() method works differently depending on which data point I access.

Something like…

chart.series[0].data[0].remove();

…works nicely. Removes the bar and the category associated with the bar. Now a small change:

chart.series[0].data[1].remove(); 

and while the bar is removed the category is not. Trying to modify the categories and use setCategory does not alleviate the issue.

Please see: http://jsfiddle.net/FxY63/2/

What kind of magic do I need to cast to so that pressing “Remove Point 2” properly cleans up the categories array and leaves the correct number of tics on the y-axis?

  • 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-26T23:46:43+00:00Added an answer on May 26, 2026 at 11:46 pm

    This appears to be the only solution I could come up with from my searching. Storing your categories and data into arrays, and depending on the index you want to remove splice the data/category out of the arrays and re-set the category/data to the chart causing it to redraw with the new data.

    Fiddle Demo: http://jsfiddle.net/3dcbY/

    var categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
    var data = [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4];
    
    // button handler
    $('#button1').click(function() {
        var series = chart.series[0];
        if (series.data.length) {
            categories.splice(0,1);
            data.splice(0,1);
    
            series.setData(data);
            chart.xAxis[0].setCategories(categories);
        }
    });
    
    // button handler
    $('#button2').click(function() {
        var series = chart.series[0];
        if (series.data.length) {
            categories.splice(1,1);
            data.splice(1,1);
    
            series.setData(data);
            chart.xAxis[0].setCategories(categories);
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple highcharts js chart, which has dates on x-axis and
I have the following which works fine: $(document).ready(function() { get_data_for_chart(); function get_data_for_chart() { $.ajax({
I have what I'd consider a relatively simple Highcharts chart that I want to
I want to have the HighChart update the series by added the next data
if i have two functions that been called from ajax and i want to
I have a highchart that I am generating the data for dynamically based on
I have a Javascript Highchart that I'm displaying and trying to get more information
I have a really strange behavior with highchart (via rails plugin): The graph display
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=

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.