score:1
Accepted answer
I have resolved this myself in the end using the following:
HttpClient client = new HttpClient();
client.BaseAddress = new Uri("http://export.highcharts.com");
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var content = new StringContent(json, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync("", content).Result;
if (response.IsSuccessStatusCode)
{
FileStream fileStream = new FileStream(pathname, FileMode.Create, FileAccess.Write, FileShare.None);
response.Content.CopyToAsync(fileStream).ContinueWith(
(copyTask) =>
{
fileStream.Close();
});
}
else
{
Console.WriteLine($"Failed to poste data. Status code:{response.StatusCode}");
}
The json for it I constructed via the options here: https://www.highcharts.com/docs/export-module/export-module-overview
Apologies for the crude example which I will obviously modify and clean up my end but wanted to give the answer to this should anyone else find it useful.
Source: stackoverflow.com
Related Query
- Run Highcharts on Server side code to add to Word document
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Highcharts SVG Export from Python Server Side Code
- Generation of svg on server side using highcharts
- Highcharts server side rendering draw a mysterious semi circle donut shape
- How do i add mouse wheel code in Angular2 highcharts in typescript
- Highcharts server side image generation, how to set up legend labelFormatter in callback argument
- Add Source to Highcharts Export CSV
- Highcharts Server side generation not working on windows 2008 server
- Highcharts server side export Pie With Data Labels (phantomjs)
- Highcharts and Java: saving image on server side
- How to add flags to highcharts export server when started as a module
- How to add right side legend to US highcharts map that shows eastern states names?
- charts highcharts add spacethe right side
- Exporting Charts on server side with Highcharts and PhantomJS to make a custom PDF
- Server side chart .svg export with Highcharts and PhantomJS, error loading data from .csv file
- Add additional data to a Highcharts series for use in formatters
- how to add copyright symbol in a highcharts title?
- Highcharts tooltip always on right side of cursor
- How do I add an event listener to a Highcharts object *AFTER* I've created it
- Export Highcharts to PDF (using javascript and local server - no internet connection)
- Add series total to legend in Highcharts
- Can I add an "average" line to Highcharts Chart?
- Highcharts saying undefined is not a function when trying to add a new chart
- Add tooltip to legend in highcharts when hovering
- Add buttons in chart of Highcharts at runtime
- HighCharts Pie Chart - Add text inside each slice
- I can't make Highcharts phantomJs export server work
- Add a gap between the second and third series in a Highcharts column plot with four series displayed
- Highcharts add legend on export
More Query from same tag
- Plotline to touch the yaxis
- How to set up drilldown feature for multiple boxplot series in highcharter?
- GWT Highcharts - Semi circle donut
- Setting xAxis.min breaks area display in two-point highcharts
- Highcharts set legend height
- R Highcharter: tooltip customization
- How to select a region of a Highcharts by a Javascript
- Change HighStock chart label on changing rangeselector button
- Creating charts and including them in email, a PHP lib that can render to image?
- highcharts xAxis pointStart issue
- Show Pie Chart Name as Title
- Is there a way to pass in variable element ID from Highcharts to launch a modal window?
- Additional Chart in Tooltip possible?
- Highcharts 4.1.1 adding a severe drop shadow to data labels if you specify a font color
- JSON data not showing in highstock candlestick chart using PHP and SQL
- Highcharts - second y axis and plotlines in x and y directions
- PHP + mysql + highcharts
- Highstock different time value interval
- HighCharts using Text in yAxis instead of numbers
- how can i add in highcharts a different dashStyle just for a part of the graph
- highcharts endOnTick option showing unspecified value on axis
- call hidden value to highchart
- Getting information from one Rails server to Another
- The tooltip is cut off in Highcharts 3.X
- Updating the axis of a highcharts chart object using jquery after inital render (django)
- Highcharts (scatter) tooltip notworking
- "viewFullscreen" menu item is not showing in the context menu of highcharts 6.2.0
- How to add box shaders to plot Highcharts
- highcharts range selector buttons spacing issue
- how to import highcharts offline-exporting in typescript