score:13
Accepted answer
you could redefine the credits click handler after the plot is drawn in the charts load event:
chart: {
events:{
load: function() {
this.credits.element.onclick = function() {
window.open(
'http://www.example.com',
'_blank'
);
}
}
}
},
fiddle here.
score:3
// plugin to add support for credits.target in highcharts.
highcharts.wrap(highcharts.chart.prototype, 'showcredits', function (proceed, credits) {
proceed.call(this, credits);
if (credits.enabled && this.credits) {
this.credits.element.onclick = function () {
// dynamically create an anchor element and click it
// use the settings defined in highcharts (credits.target)
var link = document.createelement('a');
link.href = credits.href;
link.target = credits.target;
link.click();
}
}
});
$('#container').highcharts({
credits: {
enabled: true,
text: 'credits',
href: 'http://example.com',
target: '_blank'
},
});
using the highcharts configuration (credits section with target) a new link element is created on the fly and clicked, when you click "credits". chained events. this allows to reuse the code and act based on the configuration.
score:6
here is solution that worked for me.
credits: {
enabled: true,
text: 'text',
href: 'javascript:window.open("http://www.example.com/", "_blank")'
},
Source: stackoverflow.com
Related Query
- How to open credits url of highcharts in new tab
- How do I open a new window / tab by clicking on a column / bar within a Highchart graph?
- Export button on highcharts to open new tab
- How to update new plotline values instead of removing and adding new ones in highcharts
- How to add new points to highcharts after plotting the first 'n' points?
- How to remove HighCharts new Hover Effect?
- How do i add mouse wheel code in Angular2 highcharts in typescript
- how to display 2 same highcharts without duplicate the code
- How to edit tooltip in Highcharts C# code
- how to use highcharts tooltip formatter in python code
- how to add new index Highcharts column drilldown chart
- Open Highcharts xAxis link in new window
- How to open ui-bootstrap dropdown on clicking over angular highcharts
- Simple, Open source PHP wrapper for Highcharts library
- How to overwrite Highcharts credits default settings
- How to have multiple highcharts with different series data in vuejs without repeating code
- How do I access HighCharts themes, modify and create new themes?
- How to create a drilleable bar graph in jsp page using open source charts API
- Error: Data source must be a URL for refresh | console error | javascript | Highcharts
- How to set the url of moment.min.js to local js file when highcharts exporting png file
- How to update current view in Highstock / Highcharts based on new Plotlines?
- Highcharts in JQuery Tabs - Resizing hidden tab code stops resizing visible tab
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- How to open chart in new tab?
- how do i link my sqlite(PDO) databse data to highcharts code
- Highstock Chart with URL in flag text won't open in new window
- how do you create a link on highcharts to open up pop up window with another chart
- how to stop ajax call in live highcharts when no new data
- how can I use rangeselector and navigation in highcharts in the given code
- How do I stop Highcharts creating a new gridline at the extremities of the chart unless a data point exceeds the min/max gridline?
More Query from same tag
- Color the portions of chart using "Google 3D Pie chart API" in Android
- How can I change the color of legend points?
- Highcharts 3D scatter points not showing names in tooltips
- Highcharts grouped columns of varying widths that fill the entire space automatically
- Bar chart not drawn when chart renders
- Add new data to a Highchart pie chart dynamically
- Building HighCharts-Export Server 2.1 Fails
- Incorrect data point value in highcharts navigator series when extending min and max date
- hPlot pie chart - show percentage in tooltip instead of absolute values
- handle click event in bar chart
- scrollbar is not initially visible in highstock
- Highcharts - how to dynamically disable plotBorder without recreating a chart
- Resize High Charts based on grid layout width and height using react
- How to pass dynamic data in highchart using angularjs?
- Standardizing two Hashes to include same keys
- R Package Highcharter: How do I drilldown to multiple series stacked column graph?
- Own back button for drilldown charts
- Highcharts Dynamic Drilldown using json
- Highcharts missing bars when running through PhantomJS
- How to add markers to a grouped bar plot in Highcharts?
- Slider implementation for the dates on the x-axis not working correctly in Highcharts
- Columns not stacking up with HighCharterR in the tooltip
- Creating a live web app
- How does it implement this chart with highcharts?
- Browser hanged while plotting more than 10000 series using Highcharts
- Switch between pie charts and bar chart in highcharts
- Highcharts custom symbol
- Highchart export is calling events
- How to access outer scope variables within a click function in HighCharts
- Why chart is not rendered correctly after export?