Skip to content

Commit 26e97b2

Browse files
author
Rahul Kumar
committed
- Build process created.
- Add basic sample - Added FusionCharts v3.5.1
1 parent 1357524 commit 26e97b2

25 files changed

+3381
-115382
lines changed

FusionCharts/FusionCharts/FusionCharts.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>FusionCharts</RootNamespace>
1111
<AssemblyName>FusionCharts</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<DebugSymbols>true</DebugSymbols>
@@ -29,6 +30,7 @@
2930
<DefineConstants>TRACE</DefineConstants>
3031
<ErrorReport>prompt</ErrorReport>
3132
<WarningLevel>4</WarningLevel>
33+
<DocumentationFile>bin\Release\FusionCharts.XML</DocumentationFile>
3234
</PropertyGroup>
3335
<ItemGroup>
3436
<Reference Include="System" />

build/7za.exe

574 KB
Binary file not shown.

build/release.bat

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@echo off
2+
echo.
3+
echo.
4+
echo.
5+
echo Clearing folder structure...
6+
rd /s /q "..\production\asp-net-wrapper\." 1>nul 2>&1
7+
mkdir "..\production\asp-net-wrapper" 1>nul 2>&1
8+
mkdir "..\production\asp-net-wrapper\Bin" 1>nul 2>&1
9+
del /q "..\production\asp-net-wrapper.zip" 1>nul 2>&1
10+
echo.
11+
12+
echo Copying production ready files...
13+
xcopy /y /s /e "..\sample\*.*" "..\production\asp-net-wrapper" 1>nul 2>&1
14+
rd /s /q "..\production\asp-net-wrapper\App_Code\." 1>nul 2>&1
15+
copy /y "..\FusionCharts\FusionCharts\bin\Release\FusionCharts.dll" "..\production\asp-net-wrapper\Bin\." 1>nul 2>&1
16+
copy /y "..\FusionCharts\FusionCharts\bin\Release\FusionCharts.xml" "..\production\asp-net-wrapper\Bin\." 1>nul 2>&1
17+
copy /y "..\readme.md" "..\production\asp-net-wrapper\." 1>nul 2>&1
18+
19+
echo.
20+
echo Making production package...
21+
7za.exe a -r "..\production\asp-net-wrapper.zip" "..\production\asp-net-wrapper" 1>nul 2>&1
22+
rd /s /q "..\production\asp-net-wrapper\." 1>nul 2>&1
23+
echo.
24+
echo Done!!!
25+
pause

sample/App_Code/FusionCharts.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ public enum ChartParameter
3232
bgOpacity
3333
}
3434

35+
/// <summary>
36+
/// List of supported data formats
37+
/// </summary>
38+
public enum DataFormat
39+
{
40+
json,
41+
jsonurl,
42+
xml,
43+
xmlurl,
44+
csv
45+
}
46+
3547
#region constructor methods
3648
/// <summary>
3749
/// Chart constructor
@@ -471,11 +483,10 @@ public void SetData(string dataSource)
471483
/// </summary>
472484
/// <param name="dataSource">Data for the chart</param>
473485
/// <param name="dataFormat">Data format. e.g. json, jsonurl, csv, xml, xmlurl</param>
474-
475-
public void SetData(string dataSource, string dataFormat)
486+
public void SetData(string dataSource, DataFormat format)
476487
{
477488
SetChartParameter("dataSource", dataSource);
478-
SetChartParameter("dataFormat", dataSource);
489+
SetChartParameter("dataFormat", format.ToString());
479490
}
480491

481492
#endregion

sample/BasicChart.aspx

Lines changed: 0 additions & 16 deletions
This file was deleted.

sample/BasicChart.aspx.cs

Lines changed: 0 additions & 40 deletions
This file was deleted.

sample/Data/Data.json

Lines changed: 95 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,95 @@
1-
{
2-
"chart":{
3-
"caption":"Monthly Unit Sales", "xaxisname":"Month",
4-
"yaxisname":"Units", "showvalues":"0",
5-
"formatnumberscale":"0", "showborder":"1" },
6-
"data":[
7-
{ "label":"Jan", "value":"462" },
8-
{ "label":"Feb", "value":"857" },
9-
{ "label":"Mar", "value":"671" },
10-
{ "label":"Apr", "value":"494" },
11-
{ "label":"May", "value":"761" },
12-
{ "label":"Jun", "value":"960" },
13-
{ "label":"Jul", "value":"629" },
14-
{ "label":"Aug", "value":"622" },
15-
{ "label":"Sep", "value":"376" },
16-
{ "label":"Oct", "value":"494" },
17-
{ "label":"Nov", "value":"761" },
18-
{ "label":"Dec", "value":"960" }
19-
]
20-
}
1+
{
2+
"chart": {
3+
"caption": "Monthly",
4+
"xaxisname": "Month",
5+
"yaxisname": "Revenue",
6+
"numberprefix": "$",
7+
"showvalues": "1",
8+
"animation": "0"
9+
},
10+
"data": [
11+
{
12+
"label": "Jan",
13+
"value": "420000"
14+
},
15+
{
16+
"label": "Feb",
17+
"value": "910000"
18+
},
19+
{
20+
"label": "Mar",
21+
"value": "720000"
22+
},
23+
{
24+
"label": "Apr",
25+
"value": "550000"
26+
},
27+
{
28+
"label": "May",
29+
"value": "810000"
30+
},
31+
{
32+
"label": "Jun",
33+
"value": "510000"
34+
},
35+
{
36+
"label": "Jul",
37+
"value": "680000"
38+
},
39+
{
40+
"label": "Aug",
41+
"value": "620000"
42+
},
43+
{
44+
"label": "Sep",
45+
"value": "610000"
46+
},
47+
{
48+
"label": "Oct",
49+
"value": "490000"
50+
},
51+
{
52+
"label": "Nov",
53+
"value": "530000"
54+
},
55+
{
56+
"label": "Dec",
57+
"value": "330000"
58+
}
59+
],
60+
"trendlines": [
61+
{
62+
"line": [
63+
{
64+
"startvalue": "700000",
65+
"istrendzone": "1",
66+
"valueonright": "1",
67+
"tooltext": "AYAN",
68+
"endvalue": "900000",
69+
"color": "009933",
70+
"displayvalue": "Target",
71+
"showontop": "1",
72+
"thickness": "5"
73+
}
74+
]
75+
}
76+
],
77+
"styles": {
78+
"definition": [
79+
{
80+
"name": "CanvasAnim",
81+
"type": "animation",
82+
"param": "_xScale",
83+
"start": "0",
84+
"duration": "1"
85+
}
86+
],
87+
"application": [
88+
{
89+
"toobject": "Canvas",
90+
"styles": "CanvasAnim"
91+
}
92+
]
93+
}
94+
}
95+

sample/Data/Data.xml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
<chart caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0'
2-
formatNumberScale='0' showBorder='1'>
3-
<set label='Jan' value='462' />
4-
<set label='Feb' value='857' />
5-
<set label='Mar' value='671' />
6-
<set label='Apr' value='494' />
7-
<set label='May' value='761' />
8-
<set label='Jun' value='960' />
9-
<set label='Jul' value='629' />
10-
<set label='Aug' value='622' />
11-
<set label='Sep' value='376' />
12-
<set label='Oct' value='494' />
13-
<set label='Nov' value='761' />
14-
<set label='Dec' value='960' />
1+
<chart caption="Monthly" xaxisname="Month" yaxisname="Revenue" numberprefix="$" showvalues="1" animation="0">
2+
<set label="Jan" value="420000" />
3+
<set label="Feb" value="910000" />
4+
<set label="Mar" value="720000" />
5+
<set label="Apr" value="550000" />
6+
<set label="May" value="810000" />
7+
<set label="Jun" value="510000" />
8+
<set label="Jul" value="680000" />
9+
<set label="Aug" value="620000" />
10+
<set label="Sep" value="610000" />
11+
<set label="Oct" value="490000" />
12+
<set label="Nov" value="530000" />
13+
<set label="Dec" value="330000" />
14+
<trendlines>
15+
<line startvalue="700000" istrendzone="1" valueonright="1" tooltext="AYAN" endvalue="900000" color="009933" displayvalue="Target" showontop="1" thickness="5" />
16+
</trendlines>
17+
<styles>
18+
<definition>
19+
<style name="CanvasAnim" type="animation" param="_xScale" start="0" duration="1" />
20+
</definition>
21+
<application>
22+
<apply toobject="Canvas" styles="CanvasAnim" />
23+
</application>
24+
</styles>
1525
</chart>

sample/Default.aspx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="BasicExample_BasicChart" %>
2+
3+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+
<html>
5+
<head>
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7+
<title>FusionCharts - Simple Column 3D Chart</title>
8+
<!-- FusionCharts script tag -->
9+
<script type="text/javascript" src="fusioncharts/fusioncharts.js"></script>
10+
<!-- End -->
11+
</head>
12+
<body>
13+
<div style="text-align:center">
14+
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
15+
</div>
16+
</body>
17+
</html>

sample/Default.aspx.cs

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
using System;
2+
using System.Collections;
3+
using System.Configuration;
4+
using System.Data;
5+
6+
using System.Web;
7+
using System.Web.Security;
8+
using System.Web.UI;
9+
using System.Web.UI.HtmlControls;
10+
using System.Web.UI.WebControls;
11+
using System.Web.UI.WebControls.WebParts;
12+
13+
using FusionCharts.Charts;
14+
15+
public partial class BasicExample_BasicChart : System.Web.UI.Page
16+
{
17+
protected void Page_Load(object sender, EventArgs e)
18+
{
19+
// This page demonstrates the ease of generating charts using FusionCharts.
20+
// For this chart, we've used a pre-defined Data.xml (contained in /Data/ folder)
21+
// Ideally, you would NOT use a physical data file. Instead you'll have
22+
// your own ASP.NET scripts virtually relay the XML data document.
23+
// FusionCharts supports various data format, please comment the code for
24+
// current data format (Chart.DataFormat.xmlurl) and uncomment the required format to view respective examples.
25+
// For a head-start, we've kept this example very simple.
26+
27+
// Create the chart - Column 3D Chart with data from Data/Data.xml
28+
Chart sales = new Chart();
29+
30+
// Setting chart id
31+
sales.SetChartParameter(Chart.ChartParameter.chartId, "myChart");
32+
33+
// Setting chart type to Column 3D chart
34+
sales.SetChartParameter(Chart.ChartParameter.chartType, "column3d");
35+
36+
// Setting chart width to 500px
37+
sales.SetChartParameter(Chart.ChartParameter.chartWidth, "600");
38+
39+
// Setting chart height to 400px
40+
sales.SetChartParameter(Chart.ChartParameter.chartHeight, "350");
41+
42+
// Setting chart data as XML URL
43+
sales.SetData("Data/Data.xml", Chart.DataFormat.xmlurl);
44+
45+
// Setting chart data as XML String
46+
// sales.SetData("<chart caption='Monthly' xaxisname='Month' yaxisname='Revenue' numberprefix='$' showvalues='1' animation='0'> <set label='Jan' value='420000' /> <set label='Feb' value='910000' /> <set label='Mar' value='720000' /> <set label='Apr' value='550000' /> <set label='May' value='810000' /> <set label='Jun' value='510000' /> <set label='Jul' value='680000' /> <set label='Aug' value='620000' /> <set label='Sep' value='610000' /> <set label='Oct' value='490000' /> <set label='Nov' value='530000' /> <set label='Dec' value='330000' /> <trendlines> <line startvalue='700000' istrendzone='1' valueonright='1' tooltext='AYAN' endvalue='900000' color='009933' displayvalue='Target' showontop='1' thickness='5' /> </trendlines> <styles> <definition> <style name='CanvasAnim' type='animation' param='_xScale' start='0' duration='1' /> </definition> <application> <apply toobject='Canvas' styles='CanvasAnim' /> </application> </styles> </chart>", Chart.DataFormat.xml);
47+
48+
// Setting chart data as JSON String (Uncomment below line
49+
//sales.SetData("{\"chart\":{\"caption\":\"Monthly\",\"xaxisname\":\"Month\",\"yaxisname\":\"Revenue\",\"numberprefix\":\"$\",\"showvalues\":\"1\",\"animation\":\"0\"},\"data\":[{\"label\":\"Jan\",\"value\":\"420000\"},{\"label\":\"Feb\",\"value\":\"910000\"},{\"label\":\"Mar\",\"value\":\"720000\"},{\"label\":\"Apr\",\"value\":\"550000\"},{\"label\":\"May\",\"value\":\"810000\"},{\"label\":\"Jun\",\"value\":\"510000\"},{\"label\":\"Jul\",\"value\":\"680000\"},{\"label\":\"Aug\",\"value\":\"620000\"},{\"label\":\"Sep\",\"value\":\"610000\"},{\"label\":\"Oct\",\"value\":\"490000\"},{\"label\":\"Nov\",\"value\":\"530000\"},{\"label\":\"Dec\",\"value\":\"330000\"}],\"trendlines\":[{\"line\":[{\"startvalue\":\"700000\",\"istrendzone\":\"1\",\"valueonright\":\"1\",\"tooltext\":\"AYAN\",\"endvalue\":\"900000\",\"color\":\"009933\",\"displayvalue\":\"Target\",\"showontop\":\"1\",\"thickness\":\"5\"}]}],\"styles\":{\"definition\":[{\"name\":\"CanvasAnim\",\"type\":\"animation\",\"param\":\"_xScale\",\"start\":\"0\",\"duration\":\"1\"}],\"application\":[{\"toobject\":\"Canvas\",\"styles\":\"CanvasAnim\"}]}}", Chart.DataFormat.json);
50+
51+
// Setting chart data as JSON URL
52+
//sales.SetData("Data/Data.json", Chart.DataFormat.jsonurl);
53+
54+
Literal1.Text = sales.Render();
55+
}
56+
}

0 commit comments

Comments
 (0)