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

create 3d chart using C#


 148

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     Created   
The power of the user (%)
72%



The most helpful C# solutions

detect ie C#detect ie C#C#

Click to see more ...

  2.9K     839

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

Click to see more ...

  1.2K     247

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

Click to see more ...

  781     162

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

Click to see more ...

  534     142

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

Click to see more ...

  511     126

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

Click to see more ...

  444     124

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 ...

  382     121

how to detect the type of a browser using C# in asp.net ?how to detect the type of a browser using C# in asp.net ?C#

Click to see more ...

  307     59

get username using C#get username using C#C#

Click to see more ...

  282     57

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

Click to see more ...

  262     56