C# create 3d chart c# - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution
join us

create 3d chart using C#


 489

C#


3

// js cdn scripts is needed to use
// default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Class1.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="https://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script type="text/javascript" src="https://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.ocean.js"></script>
</head>
<body>
<div style="text-align:center">
<asp:Literal ID="Chart1" runat="server"></asp:Literal>
</div>
</body>
</html>

// in Class1.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

// FusionCharts.Charts namespace is needed - FusionCharts.dll file put into bin
using FusionCharts.Charts;

public partial class _Default: System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

Chart mychart = new Chart();

mychart.SetChartParameter(Chart.ChartParameter.chartId, "MyChart");

mychart.SetChartParameter(Chart.ChartParameter.chartType, "column3d");

mychart.SetChartParameter(Chart.ChartParameter.chartWidth, "800");

mychart.SetChartParameter(Chart.ChartParameter.chartHeight, "450");

mychart.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);

Chart1.Text = mychart.Render();

}

}


By        
The power of the user (%)
80%



The most helpful C# solutions

detect ie C#detect ie C#C#

Click to see more ...

  4.6K     853

get latitude and longitude from ip address c#get latitude and longitude from ip address c#C#

Click to see more ...

  2.8K     257

get real user country C#get real user country C#C#

Click to see more ...

  1.7K     252

Get real client ip address using C# ?Get real client ip address using C# ?C#

Click to see more ...

  1.8K     247

check if cookie exists c#check if cookie exists c#C#

Click to see more ...

  6.3K     173

get city country region timezone c#get city country region timezone c#C#

Click to see more ...

  2.7K     163

How to detect the browser opera using C# in asp.net ?How to detect the browser opera using C# in asp.net ?C#

Click to see more ...

  2.3K     136

get hostname using C#get hostname using C#C#

Click to see more ...

  1.1K     127

Get real client latitude and longitude using C# ?Get real client latitude and longitude using C# ?C#

Click to see more ...

  829     127

how to initialize a connection to mysql database using C# ?how to initialize a connection to mysql database using C# ?C#

Click to see more ...

  1.2K     122

Welcome aboard!
We are happy you are here and
wish you good net-raft!