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页面的 ...
随机推荐
- cocos2dx 动画 二(iOS)
7.Bezier曲线 需要ccBezierConfig结构体,设置2个控制点和一个结束点 ccBezierConfig bc; bc.controlPoint_1 = Vec2(,); bc.cont ...
- swt
http://blog.sina.com.cn/s/blog_557ebb4c0101mgtc.html http://blog.csdn.net/kagoy/article/details/1746 ...
- JqueryUI插件网络连接
operamasks_UI官网 http://ui.operamasks.org/website/homepage.html EasyUI官网 http://www.jeasyui.com/index ...
- 4月13日 php
用php打印乘法表: <html> <head> <title>我的第一个PHP页面</title> </head> <body> ...
- document 写法
# UfsProgressBar ## Component InfoA progress bar component of specified progress. ## Usage```<ufs ...
- 重写Collections实现自定义排序
Collections.sort(List<Object>, new Comparator<Object>() { public int compare(Object o1, ...
- Python中urlopen()介绍
#以下介绍是基于Python3.4.3 一. 简介 urllib.request.urlopen()函数用于实现对目标url的访问. 函数原型如下:urllib.request.urlopen( ...
- SQL如何查询两个表的数据
在进行查询操作时,我们通常需要查询两个关联表的数据,我们可以使用where语句进行查询,如: select Emp.E_Id,Company.C_OraName from Emp,Company wh ...
- Rufus-Create bootable USB drives the easy way
Rufus Create bootable USB drives the easy way Rufus is a utility that helps format and create bootab ...
- android开发3:四大基本组件的介绍与生命周期
android开发3:四大基本组件的介绍与生命周期 Android四大基本组件分别是Activity,Service服务,Content Provider内容提供者,BroadcastReceiver ...