score:2
Accepted answer
The best way to add a custom element inside the legend is to use the legend.labelFormatter.
events: {
render() {
let chart = this,
legendAttr = chart.legend.box.getBBox(),
padding = 5;
chart.plus = chart.renderer.text('| +', chart.legend.box.parentGroup.alignAttr.translateX + legendAttr.width + padding, chart.spacingBox.height + padding / 2).attr({
cursor: 'pointer',
}).css({
fontSize: 20
}).on(
"click",
function() {
alert('plus was clicked')
}
).add()
}
}
API References: https://api.highcharts.com/highcharts/legend.labelFormatter,
score:-1
I decided to just get rid of the title and add custom css to the top of it.
Source: stackoverflow.com
Related Query
- Highcharts: How to add another(custom) label/ legend/ something else to the top right of the graph?
- How can I add a text link just below the legend box in highcharts
- Highcharts -> how to add vertical title to bar? how to make the symbol in the legend a rectangle?
- Highcharts Highstock How do I change the label on top of tooltip for OHLC series data?
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- Highcharts - How to display legend symbol inside the tooltip
- How do you add text to the bottom center of legend and bottom center of chart under legend?
- How to Check and Uncheck all the Legend elements in HighCharts Linechart?
- How to add a label above each bar in HighCharts
- How do I remove the color swatch from my HighCharts legend without affecting the column?
- How to add new points to highcharts after plotting the first 'n' points?
- Highcharts: How to provide a custom stack label in highcharts bar graph from within the stackLabel formatter?
- Highcharts : How to fix labels to the top when xAxis rotation is 90°?
- Highcharts Bubble Chart - How to move an individual point's data label (dataLabel) to the front/top
- How to add point to the beginning of series, Highcharts
- How do i add mouse wheel code in Angular2 highcharts in typescript
- how to display 2 same highcharts without duplicate the code
- Add data dynamically to the top level in highcharts when drilling up
- how can i add in highcharts a different dashStyle just for a part of the graph
- How to keep the highcharts legend "on" while hiding the series
- How to add a border to the title in highcharts
- How to show the legend in HighCharts
- How to move the legend in Highcharts
- Hide or Disable Legend or Label in the end Highcharts line
- How to add an extra label on a scatter plot point in Highcharts Javascript library?
- How to add one more value against at the end of each bar with a legend
- how to create a highcharts area with the top area highlighted?
- Highcharts - how to add icons to a label
- How can I display crosshair labels on top of the chart with Highcharts
- How to add dots to Highcharts legend and bars?
More Query from same tag
- Fomatting the Highcharts date with correct month
- Highcharts tooltips with embedded sparklines
- Highcharts: Avoid showing extra x axis points when max x-axis value defined
- Highcharts: Is it possible to display series with the same name in different columns?
- Disabling highcharts stacked bar's highlight
- Highcharts - Column Chart Drilldown, how to change the drilldown bar color based on some value
- Highcharts - On Click event
- Iterating through JSON structure matching criteria
- Highchart line graph - Parse json
- Change chart subtitle programmatically
- Fetch Values for Chart using JSON for Database driven Chart (highchart.js)
- Highcharts add single line to column chart
- Highcharts stacking bar chart border not displaying on right side
- Make Highcharts pick a smart y-axis min
- Highcharts Combo graphs with common legend click
- Passing a JavaScript function from JSON encoded PHP
- Highcharts showing ticks number, instead of date
- searching for a string in multiple arrays with forEach
- Show tooltip programmatically in StockChart for multiples series (highchart)
- Solid Gauge Highcharts data assignment
- Rendering a graph in highcharts/miso
- Increase or decrease point intervals in high chart
- How to point the range(dataClasses) for 2nd index in data using highcharts?
- Highcharts issues in [object Object]:0.0 for pie chart
- Mixed Chart Types using Chartkick/Highcharts on Rails
- Displaying or aligning to End of Month, in X-Axis
- Highcharts series graph to start and end on tick and end on max
- Highcharts.js, how to zoom in on one chart to resize another as Stackoverflow has done?
- How to hide date time x-axis but still be able to show plot lines in Highcharts gantt chart?
- Error while creating the chart using highchart