如何将数据与componentart图表绑定 [英] How to bind data with componentart chart

查看:65
本文介绍了如何将数据与componentart图表绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用componentart图表在asp.net项目中生成图表.
当我使用下面的代码为静态数据时,图表将正常工作

i am using componentart chart for generating the charts in asp.net project.
the charts are working when i use the code below which is static data

<my:XYChart Is3D="True" XPath="X" x:Name="XYChart1">
            <my:XYChart.DataSource>
                <my1:DemoDataValues>
                    <my1:DemoDataValue X="Jan" Y="40" />
                    <my1:DemoDataValue X="Feb" Y="50" />
                    <my1:DemoDataValue X="Mar" Y="12" />
                    <my1:DemoDataValue X="Apr" Y="25" />
                    <my1:DemoDataValue X="May" Y="43" />
                    <my1:DemoDataValue X="Jun" Y="87" />
                    <my1:DemoDataValue X="Jul" Y="54" />
                    <my1:DemoDataValue X="Aug" Y="34" />
                    <my1:DemoDataValue X="Sep" Y="23" />
                    <my1:DemoDataValue X="Oct" Y="4" />
                    <my1:DemoDataValue X="Nov" Y="78" />
                    <my1:DemoDataValue X="Dec" Y="65" />
                </my1:DemoDataValues>
            </my:XYChart.DataSource>
            <my:LineSeries YPath="Y" />
            <my:MarkerSeries YPath="Y" />
        </my:XYChart>




但是现在的问题是如何将图表与sql服务器数据库绑定.我正在Silverlight中使用Web服务从数据库获取数据.但无法与图表绑定数据?




but now the problem is that how to bind the charts with the sql server database .i am using the web service in silverlight to get the data from database .but not able to bind data with charts ?

推荐答案

您不能直接绑定到sql server数据库.
您需要一个Web服务,该服务将允许Silverlight客户端异步获取数据库的数据,然后在此处显示.
You cannot bind to the sql server database directly.
You need a web service that will allow the Silverlight client to get data for the database asynchronously and then display it here.


这篇关于如何将数据与componentart图表绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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