Knowledgebase: RadarCube ASP.NET MSAS
RiaChart - Getting started
Posted by - NA - on 16 March 2009 08:04 AM
|
|
Placing the RiaChart Control on the Web Page
Another way is to convert the Chart control (that already is on your page) into RiaChart: simply substitute the “asp” tag prefix for “rs” and the “Chart” tag name for “RiaChart” ” and add the following line after the “<%@ Page … %>” line of your apsx page: <%@ Register assembly="RadarSoft.Web.Essential.Chart" namespace="RadarSoft.Web.Essential.Chart" tagprefix="rs" %>Functions of the RiaChart ControlUsing the RiaChart control on your web page expands the options of data analysis that can be presented both as diagrams and as charts. This element is a .Net Framework component that supports the capability of design in the Microsoft Visual Studio 2008 environment. The visualization of the RiaChart control is based on the Silverlight technology.Functional Capabilities of the RSCart Control:
An example of RiaChart control element:<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadarSoft.Silverlight.Essential.Test._Default" %> <%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %> <%@ Register assembly="RadarSoft.Essential.Web" namespace="RadarSoft.Essential.Web" tagprefix="cc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/OLAPDemo3.mdb" SelectCommand="SELECT top 5 ProductName, UnitPrice, UnitsInStock FROM Products" > </asp:AccessDataSource> <cc1:RiaChart ID="RiaChart1" runat="server" DataSourceID="AccessDataSource1" Width="1200px"> <Series> <asp:Series ChartArea="ChartArea1" Name="Series1"> <Points> <asp:DataPoint YValues="10" /> <asp:DataPoint YValues="2" /> <asp:DataPoint YValues="24" /> <asp:DataPoint YValues="11.5" /> <asp:DataPoint YValues="0" /> <asp:DataPoint YValues="30.3" /> </Points> </asp:Series> <asp:Series ChartArea="ChartArea2" ChartType="Pie" Name="Series2" XValueMember="ProductName" XValueType="String" YValueMembers="UnitsInStock"> </asp:Series> <asp:Series ChartArea="ChartArea1" Name="Series3"> <Points> <asp:DataPoint YValues="20" /> <asp:DataPoint YValues="15" /> <asp:DataPoint YValues="6" /> <asp:DataPoint YValues="4.7" /> <asp:DataPoint YValues="15" /> <asp:DataPoint YValues="3" /> </Points> </asp:Series> </Series> <ChartAreas> <asp:ChartArea Name="ChartArea1"> <Position Height="95" Width="45" X="3" Y="3" /> </asp:ChartArea> <asp:ChartArea Name="ChartArea2"> <Position Height="95" Width="45" X="50" Y="3" /> </asp:ChartArea> </ChartAreas> </cc1:RiaChart> </div> </form> </body> </html> | |
|