ITeye博客

Nevron 的第一个实例

qjchen · 2012-09-03 20:30 · C# nevron · 编程语言 · Markdown

今天建立第一个实例试试

参考此处 http://www.haogongju.net/art/809569

知道序列号可以写在文件中

然后,到 http://helpdotnetvision.nevron.com/ 的 About Nevron .NET Vision Chart for .NET About Nevron Chart for .NET Getting Started 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();
        }
    }
}



可以看到下图

评论(1)

  1. #1 楼 · yanghailongld · 2012-09-18 17:39

    sadsda

    
    

    <> ||

    ||

    ||

    ||

    ||

    ||

    || **

评论功能维护中,当前仅展示历史评论。