.net后台 代码: 如图

Chart chart = new MyCharts();  //图表
            //chart.Watermark = false;  //没好使
            chart.Width = 500; //图表宽
            chart.Height = 300;//图表高
            chart.ScrollingEnabled = false;
            chart.Name = sTableName;
            chart.DataPointWidth = 1.8; //柱状图中柱子的宽度 = 图表宽*1.8%
            //chart.FontSize = 20;
            //chart.
            if (ifGetSig)
            {
                chart.MouseLeftButtonUp += new MouseButtonEventHandler(chart_MouseLeftButtonUp);
            }

Title title = new Title(); //图表的标题
            title.Text = sTitle;
            title.FontSize = 15; //图表标题字体的大小
            chart.Titles.Add(title);

// X 坐标轴
            Axis axisX = new Axis();
            AxisLabels xal = new AxisLabels //X 坐标轴样式
            {
                //Enabled = true, //设置是否显示坐标轴上的文本,默认值为true
                //Angle = 45,//设置文本显示的角度,取值为 –90 至 90
                FontSize = 15//设置文字大小
            };
            axisX.AxisLabels = xal;
            chart.AxesX.Add(axisX);
            // Y 坐标轴
            Axis axisY = new Axis();
            AxisLabels yal = new AxisLabels // Y 坐标轴样式
            {
                //Enabled = true, //设置是否显示坐标轴上的文本,默认值为true
                //Angle = 45,//设置文本显示的角度,取值为 –90 至 90
                FontSize = 15//设置文字大小
            };
            axisY.AxisLabels = yal;
            axisY.Title = sYUint; // Y 坐标轴说明文字
            axisY.TitleFontSize = 15;// Y 坐标轴说明文字字体大小

axisY.AxisMinimum = 0;// Y 坐标轴最小值

            axisY.AxisMaximum = 100; // Y轴坐标轴最大值

chart.AxesY.Add(axisY);

title.MouseLeftButtonDown += new MouseButtonEventHandler(title_MouseLeftButtonDown);

      //设置图标样式 Legend

     Legend legend = new Legend();
    legend.FontSize = 20;
    chart.Legends.Add(legend);

DataSeries dataSeries1 = new DataSeries();
            //dataSeries1.LegendText = sYTitle1;
            dataSeries1.LegendText = sYTitle1; //图表的图标说明
            dataSeries1.LabelFontSize = 20;//设置图标字体大小

//LabelAngle = oYAXIS.LabelAngle;
dataSeries.LabelAngle =-30;// Convert.ToDouble(LabelAngle);//设置坐标点数据倾斜角度(-90至90)
//dataSeries.ShowInLegend = true; //是否显示坐标点数据的图标 
dataSeries.LabelEnabled = true; //是否显示坐标点数据
dataSeries.LabelFontSize = 12;//设置图标(显示数据)字体大小
dataSeries.LabelStyle = LabelStyles.Inside;//数据内嵌

dataSeries1.RenderAs = RenderAs.Column;

DataSeries dataSeries2 = new DataSeries();
            //dataSeries2.LegendText = sYTitle2;
            dataSeries2.LegendText = sYTitle2;
            dataSeries2.LabelFontSize = 20;
            dataSeries2.RenderAs = RenderAs.Column;

DataSeries dataSeries3 = new DataSeries();
            dataSeries3.LabelFontSize = 20;
            //dataSeries3.LegendText = sYTitle3;
            dataSeries3.LegendText = sYTitle3;
            dataSeries3.RenderAs = RenderAs.Column;

DataPoint dp1;
            DataPoint dp2;
            DataPoint dp3;
            for (int i = 0; i < sXLabel.Length; i++)
            {
                dp1 = new DataPoint();
                dp2 = new DataPoint();
                dp3 = new DataPoint();

dp1.AxisXLabel = sXLabel[i];
                //dp1.LabelText
                dp1.YValue = dYValue1[i];
                //if (ifGetSig)
                //{
                //    dp1.LabelText = sTableName;
                //    dp1.MouseLeftButtonUp += new MouseButtonEventHandler(dataPoint_MouseLeftButtonUp);
                //}
                dataSeries1.DataPoints.Add(dp1);

dp2.AxisXLabel = sXLabel[i];
                dp2.YValue = dYValue2[i];
                //if (ifGetSig)
                //{
                //    dp2.LabelText = sTableName;
                //    dp2.MouseLeftButtonUp += new MouseButtonEventHandler(dataPoint_MouseLeftButtonUp);
                //}
                dataSeries2.DataPoints.Add(dp2);

dp3.AxisXLabel = sXLabel[i];
                dp3.YValue = dYValue3[i];
                //if (ifGetSig)
                //{
                //    dp3.LabelText = sTableName;
                //    dp3.MouseLeftButtonUp += new MouseButtonEventHandler(dataPoint_MouseLeftButtonUp);
                //}
                dataSeries3.DataPoints.Add(dp3);
            }

chart.Series.Add(dataSeries1);
            chart.Series.Add(dataSeries2);
            chart.Series.Add(dataSeries3);
            oGrid.Children.Add(chart);

下图转载http://www.cnblogs.com/chengxingliang/archive/2011/02/26/1965831.html

silverlight .net后台 设置visifire控件图表样式 属性说明的更多相关文章

  1. WPF后台设置xaml控件的样式System.Windows.Style

    WPF后台设置xaml控件的样式System.Windows.Style 摘-自 :感谢 作者: IT小兵   http://3w.suchso.com/projecteac-tual/wpf-zhi ...

  2. silverlight visifire控件图表制作——silverlight 后台方法页面事件

    1.返回事件 (1.返回silverlight页面,2.返回web页面) private void button_ClickBack(object sender, RoutedEventArgs e) ...

  3. silverlight visifire控件图表制作——silverlight 后台方法ControlChart.xaml.cs

    一.构造方法ControlChart 1.前台页面控件赋值 //时间下拉框赋值,下拉框赋选定值                for (int ii = DateTime.Today.Year; ii ...

  4. 设置UI控件的Layer属性(边框可见,边框颜色,边框宽度,边框圆角)

    设置UI控件的Layer属性 #import "ViewController.h" @interface ViewController () @property (strong, ...

  5. 设置TextBox控件的TextMode属性

    我想在程式代碼中將TextBox控件的TextMode属性设置為Password,寫成TextBox1.TextMode=MultiLine和TextBox1.TextMode="Multi ...

  6. silverlight visifire控件图表制作——silverlight 静态页面xaml

    一.silverlight 静态页面 1. 时间控件:DatePicker ,添加引用: xmlns:sdk="clr-namespace:System.Windows.Controls;a ...

  7. silverlight visifire控件图表制作——silverlight 后台方法画图

    1.调用wcf 获取信息 private void svc_GetSingleChartDataCompleted(object sender, GetSingleChartDataCompleted ...

  8. silverlight visifire控件图表制作——silverlight 后台方法打印

    一.后台方法 1.添加引用:using System.Windows.Printing; 2.全局变量://定义图片和文本打印变量  PrintDocument printImage; 3.构造方法体 ...

  9. JSF控件的immediate属性和页面生命周期

    JSF中的控件基本都有immediate属性,对于这个属性的使用总结如下,更详细内容可参考Oracle官方文档. 1,为了更好的理解immediate属性,先看一下JSF页面的生命周期: JSF页面的 ...

随机推荐

  1. MySQL 远程访问开启

    打开mysql客户端,直接运行以下命令:1.use mysql; 2.update user set host='%' where user='root'; 会报错:ERROR 1062 (23000 ...

  2. J2EE学习记录,EJB,JNDI,RMI

    Java EE 是java平台企业版(Java Platform Enterprise Edition)缩写,是Sum公司为企业级应用推出的标准平台. 随着Java技术的发展,J2EE平台得到了迅速的 ...

  3. AVL树相关操作

    #include <iostream> using namespace std; //AVL树的节点 template<typename T> class TreeNode { ...

  4. 在TCP协议下的数据传送

    本人小白菜逼一枚,,,,刚建立博客,也写不了太深入的,就写点上课的笔记什么的.有错误希望广大博友指出,我一定虚心学习接收改正. 我的新浪邮箱:liudaohui0805@sina.com 我的QQ邮箱 ...

  5. Linux Shell脚本入门--(linux空设备文件和重定向)>/dev/null 2>&1

    linux空设备文件和重定向 输出/输入重导向 >      >>   <   <<   :>   &>   2&>   2< ...

  6. svn的使用--解决commit冲突问题

    1.如何降低冲突解决的复杂度: 1.当文档编辑完成后,尽快提交,频繁的提交/更新可以降低在冲突发生的概率,以及发生时解决冲突的复杂度. 2.在提交时,写上明确的message,方便以后查找用户更新的原 ...

  7. ECSTORE 货币格式

    世界上许多国家都有不同的货币 格局和数字 格局 特例 .针对特定的当地化环境正确地 格局化和显示货币是当地化的一个主要部分,ecstore 可以同过后台的设置,来更改货币的格式,具体方式为 后台-&g ...

  8. 所谓has a 和 is a

    在 C# 中 很好理解: {  is    a: 继承关系.    has a: 成员关系,其他类是本类的成员.} 在C++ 中稍微复杂一点: {  由于有多重继承, 继承也可能是has a,类似C# ...

  9. C语言初学 计算三角形面积问题

    #include<stdio.h> #include<math.h> #include<stdlib.h> int main() { float a,b,c,s,a ...

  10. Hibernate学习笔记-Hibernate关系映射

    1. 初识Hibernate——关系映射 http://blog.csdn.net/laner0515/article/details/12905711 2. Hibernate 笔记8 关系映射1( ...