Microsoft .net图表 - 图表XML [英] Microsoft .net charts - Chart XML

查看:80
本文介绍了Microsoft .net图表 - 图表XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个集中的应用程序,它接受图表xml,然后创建图表,或者创建一个图像文件或将图表作为二进制返回。我们正在从dundas图表转换到microsoft .net图表,我们需要知道
我们需要创建的xml之间的差异,因为它已经改变了一点。我希望我能找到当前结构示例的xml文件:图表节点将具有可用的所有可用属性,如ChartType =" [Pie,Bar,Line等...] 此
方式我们会知道使用了什么结构以及可以使用哪些属性 

I have a centralized application that takes chart xml then creates the chart and either makes an image file or returns the chart back as binary. We are converting from dundas charts to microsoft .net charts and we need to know the differences between the xml that we need to create becuase it has changed a little. I was hoping that i could find an xml file of the current structure example: Chart nodes would have all available attributes that could be used like ChartType="[Pie, Bar, Line, etc...]" this way we would know what structure is used and what attributes are available to be used.

有没有人知道任何此类文件???

Does anyone know of any such file???

谢谢

推荐答案

嗨翻转

获取MS图表控制,您可以使用Serializer属性的Save方法创建一个xml文件。如果您需要,可以在带有按钮和图表控件的应用程序中尝试此操作。只需将文件名更改为计算机上的某个位置

for the MS Chart control, you can create an xml file using the Save method of the Serializer property. If you want you can try this in an app with a button and a chart control. Just change the filename to somewhere on your computer

Dim rndm As New Random
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim cs As New Series
        cs.Name = "Series2"
        cs.ChartType = SeriesChartType.Line
        cs.IsValueShownAsLabel = True
        cs.IsVisibleInLegend = False
        Chart1.Series.Add(cs)

        Chart1.ChartAreas(0).AxisY.Maximum = 25

        For i As Integer = 1 To 10
            Chart1.Series(0).Points.AddY(rndm.Next(1, 21))
            Chart1.Series(1).Points.AddY(rndm.Next(1, 21))
        Next
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Chart1.Serializer.Save("C:\Users\Joe\Desktop\ChartImages\ChartSerialize.xml")

    End Sub





这篇关于Microsoft .net图表 - 图表XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆