Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
COMPLETE RE-WRITE by 'Tek4' based upon imclem's original great work.
  • Loading branch information
Tek4 committed Dec 25, 2011
1 parent efbd197 commit 7a2ca80
Show file tree
Hide file tree
Showing 41 changed files with 1,834 additions and 10,871 deletions.
File renamed without changes.
Binary file not shown.
Binary file not shown.
146 changes: 146 additions & 0 deletions Exporting_Demo_website/Default.aspx
@@ -0,0 +1,146 @@
<%@ Page Language="C#"%>
<!--
==========================================================================
ASP.NET Highcharts Exporting Module Demo.
Uses Tek4.Highcharts.Exporting assembly.
(Uses Highcharts JS "Basic Line" example from Highcharts.com).
==========================================================================
Author: Kevin P. Rice, Tek4(TM) (http://Tek4.com/)
Based upon ASP.NET Highcharts export module by Clément Agarini
Copyright (C) 2011 by Tek4(TM) - Kevin P. Rice
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.
rev. 2011-12-24 Latest Svg.dll requires .NET 3.5
rev. 2011-08-18 .NET 2.0
-->
<!DOCTYPE html>
<html>
<head runat="server">
<title>ASP.NET Highcharts Exporting Module Demo (Tek4.Highcharts.Exporting assembly)</title>

<!-- 1. Include jQuery and Highcharts scripts. -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script src="http://highcharts.com/js/highcharts.js" type="text/javascript"></script>

<!-- 2. Include the Highcharts exporting module script. -->
<script src="http://highcharts.com/js/modules/exporting.js" type="text/javascript"></script>

<!-- 3. DON'T FORGET to add the exporting url to your chart (along with
any other desired exporting options):
exporting: {
url: "HighchartsExport.axd",
filename: 'MyChart',
width: 1200
}
-->
<script type="text/javascript">
var chart;
$(document).ready(function () {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
defaultSeriesType: 'line',
marginRight: 130,
marginBottom: 25
},
title: {
text: 'Monthly Average Temperature',
x: -20 //center
},
subtitle: {
text: 'Source: WorldClimate.com',
x: -20
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: {
title: {
text: 'Temperature (°C)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
formatter: function () {
return '<b>' + this.series.name + '</b><br/>' +
this.x + ': ' + this.y + '°C';
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
exporting: {
url: 'HighchartsExport.axd',
filename: 'MyChart',
width: 1200
},
series: [{
name: 'Tokyo',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
}, {
name: 'New York',
data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
}, {
name: 'Berlin',
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
}, {
name: 'London',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
}]
});
});
</script>
</head>

<body>
<div>
<h2>Tek4 ASP.NET Exporting Module for Highcharts JS Demo.</h2>
<ul style="font-family:Verdana, Courier">
<li>Exports Highcharts JS charts to PNG/JPG/PDF/SVG.</li>
<li>Uses three precompiled .DLL files in /bin directory and configuration via web.config.</li>
<li>Can be called as either an ASP.NET page (HighchartsExport.aspx) or as an HttpHandler (HighchartsExport.axd).</li>
<li>Supports Highcharts exporting 'width' option to generate high quality
images of any size (PDF images are exported at 150 dpi).</li>
<li>Supports Highcharts exporting 'filename' option to specify downloaded file name.</li>
<li>Works with .NET 3.5 Framework and above.</li>
</ul>
</div>

<form id="form1" runat="server">
<p>Highcharts JS "Basic Line" example from Highcharts.com:</p>
<div id="container" style="width:900px;"/>
</form>
</body>
</html>
1 change: 1 addition & 0 deletions Exporting_Demo_website/HighchartsExport.aspx
@@ -0,0 +1 @@
<%@ Page Inherits="Tek4.Highcharts.Exporting.Page" ValidateRequest="false"%>
107 changes: 107 additions & 0 deletions Exporting_Demo_website/web-dotNET4.0.config
@@ -0,0 +1,107 @@
<?xml version="1.0"?>
<!--
==========================================================================
Web.config example configuration for Tek4.Highcharts.Exporting assembly.
==========================================================================
Author: Kevin P. Rice, Tek4(TM) (http://Tek4.com/)
Based upon ASP.NET Highcharts export module by Clément Agarini
Copyright (C) 2011 by Tek4(TM) - Kevin P. Rice
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.
rev. 2011-08-18
-->
<configuration>

<!-- THIS WEB.CONFIG IS FOR .NET VERSION 4.0 (and later) -->

<!--
This configures the HttpHandler option (HighchartsExport.axd). With this
option you can delete the HighchartsExport.aspx page. This section is not
required if you prefer the .aspx page and don't want to use the HttpHandler.
You can specify any name for the handler in path="..."
ASP.NET HttpHandler option:
Advantages:
- No page (.aspx) file needed.
- An HttpHandler exists in all site subdirectories and child web applications
so there is no need to send an explicit URL path to Highcharts JS.
NOTE for .NET version 4.0:
The entire web site must use requestValidationMode="2.0" in order for
the handler to work in every subdirectory. Alternatively, request
validation can be specified for only one (or more) specific paths by
using the <location> element (see below).
-->
<system.web>
<httpHandlers>
<add verb="POST"
path="HighchartsExport.axd"
type="Tek4.Highcharts.Exporting.HttpHandler, Tek4.Highcharts.Exporting"/>
</httpHandlers>

<!--
This allows HttpHandler to work in every subdirectory. This changes
request validation for your entire web site. If you only want to allow
version 2.0 request validation for the HighchartsExport.axd HttpHandler,
delete this and use the <location path="..."> configuration section below.
-->
<httpRuntime requestValidationMode="2.0"/>
</system.web>

<!--
This section is needed if your web site does not specify version 2.0
request validation. Specify the path where you want to allow the HttpHandler
to work. The path is relative to the web.config file directory and must
not start with '/'.
Examples:
path="HighchartsExport.axd"
path="Export/HighchartsExport.axd"
You can specify any name for the handler, but it must match the name
specified in the <httpHandlers> section above.
-->
<location path="HighchartsExport.axd">
<system.web>
<httpRuntime requestValidationMode="2.0"/>
</system.web>
</location>

<!--
This section is needed for .NET 4.0 (and later) if you want to use the
HighchartsExport.aspx page to handle chart export requests.
You can rename the .aspx file to anything you want and place it in any
sub-directory, but the name and path below must match.
If you choose to use the HttpHandler option, then you may delete this
configuration section along with the HighchartsExport.aspx file.
-->
<location path="HighchartsExport.aspx">
<system.web>
<httpRuntime requestValidationMode="2.0"/>
</system.web>
</location>

</configuration>
55 changes: 55 additions & 0 deletions Exporting_Demo_website/web.config
@@ -0,0 +1,55 @@
<?xml version="1.0"?>
<!--
==========================================================================
Web.config example configuration for Tek4.Highcharts.Exporting assembly.
==========================================================================
Author: Kevin P. Rice, Tek4(TM) (http://Tek4.com/)
Based upon ASP.NET Highcharts export module by Clément Agarini
Copyright (C) 2011 by Tek4(TM) - Kevin P. Rice
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.
rev. 2011-12-24 Latest Svg.dll requires .NET 3.5
rev. 2011-08-18 .NET 2.0
-->
<configuration>
<!-- THIS WEB.CONFIG IS FOR .NET VERSION 3.5 -->
<!--
This configures the HttpHandler option (HighchartsExport.axd). With this
option you can delete the HighchartsExport.aspx page. This section is not
required if you prefer the .aspx page and don't want to use the HttpHandler.
You can specify any name for the handler in path="..."
Advantages:
- No page (.aspx) file needed.
- An HttpHandler exists in all site subdirectories and child web applications
so there is no need to send an explicit URL path to Highcharts JS.
-->
<system.web>
<httpHandlers>
<add verb="POST"
path="HighchartsExport.axd"
type="Tek4.Highcharts.Exporting.HttpHandler, Tek4.Highcharts.Exporting"/>
</httpHandlers>
</system.web>

</configuration>
34 changes: 34 additions & 0 deletions License-Svg.txt
@@ -0,0 +1,34 @@
LICENSE FOR: SVG Rendering Engine (Svg.dll)
===========================================

Microsoft Public License (Ms-PL)

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.

A "contribution" is the original software, or any additions or changes to the software.

A "contributor" is any person that distributes its contribution under this license.

"Licensed patents" are a contributor's patent claims that read directly on its contribution.

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

0 comments on commit 7a2ca80

Please sign in to comment.