本文整理汇总了C#中Chart.Export方法的典型用法代码示例。如果您正苦于以下问题:C# Chart.Export方法的具体用法?C# Chart.Export怎么用?C# Chart.Export使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chart
的用法示例。
在下文中一共展示了Chart.Export方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
Chart Chart1 = new Chart();
Chart1.Import(FileFormat.BinaryTemplate,@"c:\xxx.xml");
if(IsPostBack)
{
Chart1.Palette=Chart1.Palette;
return;
}
btnShow.Attributes.Add("onclick","x()");
string query = txtQuery.Text;
if(String.Empty.Equals(query))
{
query=txtQuery.Text="select filter({{[Measures].[Ta Units]},{[Measures].[Ta Wrkload]}},[Measures].[Ta Amount]>1000000 and [Measures].[Ta Units]>5000 ) on rows," +
"{filter(toggledrillstate({[AgeRange].[All AgeRange]},{[AgeRange].[All AgeRange]}),[Measures].[Ta Amount]>1000000 and [Measures].[Ta Units]>5000)} on columns" +
" from [Claims cube]";
}
//Chart1.ClearData(SoftwareFX.ChartFX.ClearDataFlag.AllData);
SoftwareFX.ChartFX.Olap.Server.OlapExtension Olap1=new SoftwareFX.ChartFX.Olap.Server.OlapExtension();
SoftwareFX.ChartFX.Olap.Server.AdoMultiDimensionalData AdoMD1=new SoftwareFX.ChartFX.Olap.Server.AdoMultiDimensionalData();
try
{
AdoMD1.Connect("Provider=MSOLAP; Datasource=localhost; Initial Catalog=FoodMart 2000;", query);
Olap1.DataSource = AdoMD1;
Chart1.Extensions.Clear();
Chart1.Extensions.Add(Olap1);
Chart1.PersonalizedFlags=SoftwareFX.ChartFX.PersonalizedFlags.AutoLoad;// & SoftwareFX.ChartFX.PersonalizedFlags.AutoSave;
}
catch
{
;
}
Chart1.Palette="Default.ModernBusiness";
outstr = Chart1.GetHtmlTag(400,400,".NET","Chart1");
Chart1.Export(FileFormat.Jpeg,@"c:\xxx.jpg");
}