今天建立第一个实例试试
参考此处
http://www.haogongju.net/art/809569
知道序列号可以写在文件中
然后,到 http://helpdotnetvision.nevron.com/
的
About Nevron .NET Vision
Chart for .NET
About Nevron Chart for .NET
[color=red]Getting Started[/color]
Integrating in Windows Forms
Overview
Integrating in Windows Forms
NChartCommandBarsManager
NChartGridControl
Integrating in Web Forms
Integrating ThinWeb Chart
User's Guide
Diagram for .NET
User Interface for .NET
Framework
这里面,抄一个例子
可以看到下图
参考此处
http://www.haogongju.net/art/809569
知道序列号可以写在文件中
然后,到 http://helpdotnetvision.nevron.com/
的
About Nevron .NET Vision
Chart for .NET
About Nevron Chart for .NET
[color=red]Getting Started[/color]
Integrating in Windows Forms
Overview
Integrating in Windows Forms
NChartCommandBarsManager
NChartGridControl
Integrating in Web Forms
Integrating ThinWeb Chart
User's Guide
Diagram for .NET
User Interface for .NET
Framework
这里面,抄一个例子
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Nevron;
using Nevron.Chart;
using Nevron.Chart.WinForm;
using Nevron.GraphicsCore;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
NLicense license = new NLicense("******************");//序列号
NLicenseManager.Instance.SetLicense(license);
NLicenseManager.Instance.LockLicense = true;
//Application.EnableVisualStyles();
////Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new Form1());
}
private void button1_Click(object sender, EventArgs e)
{
nChartControl1.Controller.Tools.Add(new NSelectorTool());
nChartControl1.Controller.Tools.Add(new NTrackballTool());
NPieChart chart = new NPieChart();
nChartControl1.Charts.Clear();
nChartControl1.Charts.Add(chart);
chart.Enable3D = true;
chart.Width = 70;
chart.Depth = 10;
chart.Projection.SetPredefinedProjection(PredefinedProjection.PerspectiveElevated);
chart.LightModel.SetPredefinedLightModel(PredefinedLightModel.ShinyCameraLight);
NPieSeries pie = (NPieSeries)chart.Series.Add(SeriesType.Pie);
pie.PieStyle = PieStyle.SmoothEdgePie;
pie.LabelMode = PieLabelMode.SpiderNoOverlap;
pie.AddDataPoint(new NDataPoint(12, "Cars"));
pie.AddDataPoint(new NDataPoint(42, "Trains"));
pie.AddDataPoint(new NDataPoint(56, "Airplanes"));
pie.AddDataPoint(new NDataPoint(23, "Buses"));
pie.AddDataPoint(new NDataPoint(32, "Bikes"));
pie.AddDataPoint(new NDataPoint(29, "Boats"));
NStyleSheet styleSheet = NStyleSheet.CreatePredefinedStyleSheet(PredefinedStyleSheet.NevronMultiColor);
styleSheet.Apply(nChartControl1.Document);
nChartControl1.Refresh();
}
}
}
可以看到下图
本文介绍如何使用Nevron.NETVisionChart库在Windows Forms应用程序中创建并显示3D饼图。文章提供了从设置许可证到图表样式的完整示例代码,并展示了如何添加交互工具。
191

被折叠的 条评论
为什么被折叠?



