score:7
Accepted answer
You can change the filename of the file. Here is an example on how to accomplish that. The relevant code:
exportButton: {
menuItems: null,
onclick: function() {
chart.exportChart({filename: 'my-png'}, null);
}
},
Here is another example that shows a little more on what can be controlled during export and printing. The relevant code:
$('#buttonExport').click(function() {
var e = document.getElementById("ExportOption");
var ExportAs = e.options[e.selectedIndex].value;
if(ExportAs == 'PNG')
{
chart.exportChart({type: 'image/png', filename: 'my-png'}, {subtitle: {text:''}});
}
if(ExportAs == 'JPEG')
{
chart.exportChart({type: 'image/jpeg', filename: 'my-jpg'}, {subtitle: {text:''}});
}
if(ExportAs == 'PDF')
{
chart.exportChart({type: 'application/pdf', filename: 'my-pdf'}, {subtitle: {text:''}});
}
if(ExportAs == 'SVG')
{
chart.exportChart({type: 'image/svg+xml', filename: 'my-svg'}, {subtitle: {text:''}});
}
});
$('#buttonPrint').click(function() {
chart.setTitle(null, { text: ' ' });
chart.print();
chart.setTitle(null, { text: 'Click and drag in the plot area to zoom in' });
});
score:2
Can you try this instead
exportButton:{
menuItems: null,
onclick:function(){
var fileName = "AAAA";//it's dynamic in reality.
this.exportChart({filename : fileName});
}
}
exportChart method takes options parameter too..
Source: stackoverflow.com
Related Query
- HighCharts exporting filename
- How to change exporting filename in highcharts
- Calling Highcharts export to jpeg but the source is https and exporting is http (security warnings issued by browser)
- Highcharts - Exporting Module
- highcharts : set title on exporting
- exporting highcharts polar chart to PDF with phantomjs
- How to change axis label size when exporting in Highcharts / Highstock
- Exporting HighCharts chart specific height width
- Highcharts exporting functionality
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts exporting over HTTPS
- Exporting highcharts data to CSV file
- Highcharts - Global configuration with common code and unique data & Headings
- angular2-highcharts Highcharts exporting module
- Highcharts chart redraw while exporting
- How to display a separating line in Highcharts exporting menu?
- HighCharts Stock Chart error code 18
- highcharts change rendered image source on click
- How can I get around "mixed active content" highcharts exporting error?
- Try to offline exporting to Highcharts
- How do i add mouse wheel code in Angular2 highcharts in typescript
- how to display 2 same highcharts without duplicate the code
- Filename not assigned to csv export in HighCharts on Mac
- Black image bug when exporting highcharts in Firefox
- Use of DotNet HighCharts dll to make charts in code behind
- Exporting with custom data label image in highcharts gantt
- Chart not exporting to XLS File - Highcharts
- Highcharts exporting hide data labels if number doesn't fit in stacked bar
- How to edit tooltip in Highcharts C# code
- what means ${demo.css} in example files of highcharts ? That piece of code seems to be literal
More Query from same tag
- How to create a bubble chart
- Is it possible to dynamically add a pane in Highstock/Highchart?
- Highcharts matching specific series points (yaxis) with xaxis?
- Can you show/hide series in sunburst diagrams?
- Are there better interface to add Highcharts support to Zeppelin
- Highcharts pie wrong legend colors
- Remove padding from barcharts Highcharts.js
- Is there a way to plot more than 1000 points in a scatter plot using the Highcharts .NET Wrapper?
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- Highcharter package not found - highchart function not available
- How do I make a Highcharts timeline where the labels don't overlap and none are hidden?
- react-hightchart: all values in event.point are null
- Toggle between charts using highcharts
- Issue while passing array to setData() function
- passing json values to highcharts from .net code behind
- How to re-create the same chart in Highcharts as seen on the mock?
- Highcharts - Pass a dictionary as data for a timeline series
- Format highcharts date tooltip to display timezone
- Highcharts yAxis text rotation issue in IE8
- Highcharts export with custom HTML graph
- Reports with parameter working fine independently but not functional in cockpit (composite document)
- Getting information from one Rails server to Another
- Changing Highcharts label and sorting x-axis using Django-chartit
- HighCharts tooltip issue
- How to add multiple series dynamically and update its data dynamically
- Memory leak in setInterval() method
- Highchart Funnel Chart not showing
- Highcharts, error with xAxis type logarithmic
- Highcharts - synchronized-charts crosshair line and circle point display
- How to apply the Renderer text() function multiple times to a Highcharts chart?