score:0
Turns out highcharts lets you add a class to the label.
var label = this.renderer.label(
footnote_text, //str
10, //x
200, //y
'rect', //shape
1, //anchorX
1, //anchorY
1, //useHTML
1, //baseline
'deleteme' //className
)
I've added a class name deleteme
and then used jQuery to delete it:
$('.highcharts-deletme').remove();
score:1
Another (and general) solution is to store generated label in a variable:
var myLabel; // define label
$('#container').highcharts({
chart: {
events: {
load: function () {
myLabel = this.renderer.label( ... ).add();
},
redraw: function () {
if(myLabel) {
myLabel.destroy();
}
myLabel = this.renderer.label( ... ).add();
}
}
}
});
It will be faster, than using jQuery to find items by classes.
Source: stackoverflow.com
Related Query
- HighCharts dynamically resize renderer label or element
- Highcharts SolidGauge Label Resize Issue
- Highcharts display label for pie chart using html table as data source
- Add label for highcharts in first element
- Dynamically Change X-axis label name in HighCharts
- Highcharts resize chart size using custom export button and replace expand and collapse button dynamically
- Dynamically changing Highcharts Theme through Jquery code not working
- Responsive Highcharts not sizing correctly until window resize
- Changing data dynamically for a series in Highcharts
- Resize height with Highcharts
- Fixed y-axis label width in Highcharts
- Highcharts charts don't resize properly on window resize
- Changing series color in highcharts dynamically
- Resize data points with highcharts
- How do I dynamically change a data point in Highcharts using JavaScript
- Highcharts does not resize charts inside tabs
- Highcharts remove renderer path
- Highcharts dynamically change bar color based on value
- How do I format x-axis label in highcharts
- Dynamically update subtitle on Highcharts chart?
- Changing Highcharts data series type dynamically
- Extend highcharts renderer symbols to have plus sign
- Highcharts graph X-axis label for different date ranges
- Highcharts pie chart dynamically changes size
- Highcharts dynamically add/change yAxis plotLines
- Dynamically update Highcharts chart in react
- How to align centre a custom label in highcharts
- Resize highcharts using react-grid-layout not working
- HighCharts Dynamically Change Chart Type
- Highcharts TypeScript, y-axis label
More Query from same tag
- BootStrap - Model Binding and HTML5/CSS3 support?
- Old state is being shown despite updating in React Highcharts click event
- High charts draggable not working for log scale
- Display the total count of json key-value pairs in the series in high charts
- How to access highstock zoom buttons via jquery?
- Issue configuring Highcharts/ Highstock candlestick (React JS)
- Dynamically add/remove xaxis categories in Highcharts
- Highstock/Highcharts timestamp values
- How to show the numbers on the y-axis by 1 on HighCharts?
- How to move Y axis on highchart
- New Node should be added without changing the position of existing one using highchart
- Add mouseover to outliers but not other points?
- HighCharts/Javascript: Resample Monthly Data Series to Quarterly/Yearly?
- Showing a cross-hair programatically in Highcharts
- HighCharts is not defined
- Cannot display multiple Highcharts on a single page
- maxPadding on highstocks
- Showing HighCharts in A JQuery Mobile application
- Add 2 legends in one chart
- GWT Highcharts, Java, and xml UiBinder?
- Highchart (pie chart) with data from HTML table not displaying legend
- Calling function 'ChartModule', function calls not supported
- Invalid argument line 80 in highcharts.js
- Is there any way to highlight one particular series in highcharts?
- Highchart-graph does not appear in internet explorer
- Highcharts age pyramid stacked bar (grouping)
- Highchart.js: use bootstrap glyphicons instead of symbols on contextbutton
- Highcharts : How to remove the gap between series and vertical axis?
- Negative bar chart of highcharts in chartjs
- Bubble chart with Highstock, how to create different tooltips?