Highcharts Export Server Client for .Net
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
HighchartsExportClient.Tests add async suffix Mar 17, 2016
HighchartsExportClient Update HighchartsExportClient.nuspec Mar 19, 2016
.gitattributes Initial commit Jan 27, 2016
.gitignore Initial commit Jan 27, 2016
LICENSE Initial commit Jan 27, 2016
README.md Update README.md Mar 19, 2016
appveyor.yml add async suffix Mar 17, 2016

README.md

#highcharts-export-client

Build status NuGet version

Highcharts-export-client is highcharts-export-server API wrapper. With help of this library you can generate fancy charts and export it to png, pdf or svg formats.

⭐️ If you ❤️ library, please star it! ⭐️

🇬🇧 English tutorial 🇷🇺 Russian tutorial

Highchart chart

#Installation

Install via NuGet

PM > Install-Package highcharts-export-client

#Requirements

#Usage ##Draw chart from Highchart Options

Basic Chart

Options is a highchart options.

	var client = new HighchartsClient(_highchartsServer);

	var options = new
	{
		xAxis = new
		{
			categories = new[] { "Jan", "Feb", "Mar" }
		},
		series = new[]
		{
			new { data = new[] {29.9, 71.5, 106.4} }
		}
	};

	var res = await client.GetChartImageFromOptionsAsync(JsonConvert.SerializeObject(options));

	File.WriteAllBytes("__imageFromBytes_defaultSettings.png", res);

##Draw chart from SVG

To draw a chart from SVG file, use this method:

	var res = await client.GetChartImageFromSvgAsync(_svg);

##Chart settings You can pass settings to library constructor for controlling result file properties. Full settings description see on highcharts-export-server page.

	var settings = new HighchartsSetting
	{
		ExportImageType = "jpg",
		ScaleFactor = 4,
		ImageWidth = 1500,
		ServerAddress = _highchartsServer
	};

	var client = new HighchartsClient(settings);

##Async mode You can use library in async mode. In this mode, each call will return a link to image. Image will be stored on the server for 15 minutes. See full documentation on highcharts-export-server.

	var res = await client.GetChartImageLinkFromOptionsAsync(JsonConvert.SerializeObject(options));

#License

The MIT License

Copyright (c) 2016 Ilya Pirozhenko http://www.sochix.ru/

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.