silverlight .net后台 设置visifire控件图表样式 属性说明
.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控件图表样式 属性说明的更多相关文章
- WPF后台设置xaml控件的样式System.Windows.Style
WPF后台设置xaml控件的样式System.Windows.Style 摘-自 :感谢 作者: IT小兵 http://3w.suchso.com/projecteac-tual/wpf-zhi ...
- silverlight visifire控件图表制作——silverlight 后台方法页面事件
1.返回事件 (1.返回silverlight页面,2.返回web页面) private void button_ClickBack(object sender, RoutedEventArgs e) ...
- silverlight visifire控件图表制作——silverlight 后台方法ControlChart.xaml.cs
一.构造方法ControlChart 1.前台页面控件赋值 //时间下拉框赋值,下拉框赋选定值 for (int ii = DateTime.Today.Year; ii ...
- 设置UI控件的Layer属性(边框可见,边框颜色,边框宽度,边框圆角)
设置UI控件的Layer属性 #import "ViewController.h" @interface ViewController () @property (strong, ...
- 设置TextBox控件的TextMode属性
我想在程式代碼中將TextBox控件的TextMode属性设置為Password,寫成TextBox1.TextMode=MultiLine和TextBox1.TextMode="Multi ...
- silverlight visifire控件图表制作——silverlight 静态页面xaml
一.silverlight 静态页面 1. 时间控件:DatePicker ,添加引用: xmlns:sdk="clr-namespace:System.Windows.Controls;a ...
- silverlight visifire控件图表制作——silverlight 后台方法画图
1.调用wcf 获取信息 private void svc_GetSingleChartDataCompleted(object sender, GetSingleChartDataCompleted ...
- silverlight visifire控件图表制作——silverlight 后台方法打印
一.后台方法 1.添加引用:using System.Windows.Printing; 2.全局变量://定义图片和文本打印变量 PrintDocument printImage; 3.构造方法体 ...
- JSF控件的immediate属性和页面生命周期
JSF中的控件基本都有immediate属性,对于这个属性的使用总结如下,更详细内容可参考Oracle官方文档. 1,为了更好的理解immediate属性,先看一下JSF页面的生命周期: JSF页面的 ...
随机推荐
- Swift - 43 - 继承, 多态, 析构函数
import Foundation /* 什么叫继承: 可以简单理解为一个类可以从它的父类或者基类中直接拿属性或者方法去使用 冒号":"表示两者之间的继承关系 */ class P ...
- java下socket传文件
package cn.stat.p4.ipdemo; import java.io.BufferedReader; import java.io.BufferedWriter; import java ...
- Spring框架知识总结-注入Bean的各类异常
近日整合sping和hibernate框架时遇到了一系列的异常,本次主要说明一下spring框架可能出现的异常及解决方案. 我们借助sping强大的bean容器管理机制,通过BeanFactory轻松 ...
- linux上 安装并 运行opencv
我是在树莓派上安装的. 1.先安装依赖项 OpenCV 2.2以后版本需要使用Cmake生成makefile文件,因此需要先安装cmake. sudo apt-get install build-es ...
- NodeJs简单七行爬虫--爬取自己Qzone的说说并存入数据库
没有那么难的,嘿嘿,说起来呢其实挺简单的,或者不能叫爬虫,只需要将自己的数据加载到程序里再进行解析就可以了,如果说你的Qzone是向所有人开放的,那么就有一个JSONP的接口,这么说来就简单了,也就不 ...
- Android再学习-20141022-Activity的生命周期
20141022-Android再学习 如何在一个应用程序当中定义多个Activity 定义一个类,继承Activity 在该类当中,复写Activity当中的onCreate方法.onCreate( ...
- 怎样制作百度recovery【转】
由于recovery的硬件相关性比较强,使得recovery的通用性不强,项目组为了降低整个开发的难度,coron项目里面默认是编译生成百度recovery的. 不过还是有很多开发者问私下我,怎样制作 ...
- PhoneGap and Titanium
http://mobile.51cto.com/web-338270.htm http://www.udpwork.com/item/6117.html http://blog.cnbang.net/ ...
- 解决Qt中文乱码以及汉字编码的问题(UTF-8/GBK)——ubuntu环境设置默认是utf-8,文件编码可使用Encodersoft批量转换
一.Qt环境设置 文件从window上传到Ubuntu后会显示乱码,原因是因为ubuntu环境设置默认是utf-8,Windows默认都是GBK.Windows环境下,Qt Creator,菜单-&g ...
- 改进RazorPad
从Git 上下载了作者的源码后,感觉用起来挺别扭,而且还要BUG............ 经过“篡改”后,好用多了,呵呵..