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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:32:06+00:00 2026-06-18T02:32:06+00:00

I have a chart that has a custom legend i.e. it isn’t part of

  • 0

I have a chart that has a custom legend i.e. it isn’t part of Highcharts at all, it’s completely my own code, the Highcharts legend is disabled for this chart.

Is it possible to turn series data AND plot bands on/off in a Highcharts chart using the API?

I found an example that triggered the click event of a legend item to do this, but this obviously relies on a legend being present, so this is no use to me: http://birdchan.com/home/2013/01/23/trigger-a-click-event-on-a-legend-item-in-highchart/

I also tried to set the series data .visible property to false and then redraw the chart and although it sets the visible property just fine, it doesn’t redraw the chart so nothing changes:

var chart = new Highcharts.Chart(myoptions);

$("#custom_legend_link").click(function (e) {
    chart.series[0].visible = !chart.series[0].visible;
    chart.redraw();
}

Here is a jsFiddle using the basic line demo showing my problem:

http://jsfiddle.net/gfyans/zsaV4/

Thanks,
Greg.

  • 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-18T02:32:07+00:00Added an answer on June 18, 2026 at 2:32 am

    To toggle the series, use Series.setVisible(). When called without parameters, it toggles.

    Plot bands are a bit different, since they don’t have methods like hide(), show() or setVisible. To toggle a plot band, you need to remove it by Axis.removePlotBand() and add a new one with the same options by Axis.addPlotBand().

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

Sidebar

Related Questions

I have a chart (code to replicate will be below) that has two lines
Using visual studio BI dev studio 2008. I have a chart that has a
I have a custom sharepoint aspx form that has an InputFormTextBox with RichText property
I have a shopping cart ListView control backed by a custom object that has
In phpMyAdmin I have a char(32) column that has no default value(ie. Default: None).
I have a rails app (rails 3.1.3) that has a shopping cart model. I
I have a cart table which has a relation to a product table that
I have an object that I'm freeing with delete, and it has a char*
I have a line chart that is updated every so and so seconds, similar
I have a WPF Chart that I am dynamically binding a BarSeries to. I

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.