Use managed code to create a visifire chart

Source: Internet
Author: User

Visifire is a good Chart solution developed using Silverlight 2.0 Beta 1. using it, you can easily add it to a project in the BS solution implemented by various technical methods. according to the official documents, you only need to add an XML file, for example:

<VC: Chart xmlns: VC = "CLR-namespace: visifire. charts; Assembly = visifire. Charts"
Theme = "theme3" animationtype = "type3">

<VC: Title text = "Athens 2004 Olympus"/>
<VC: axisx Title = "country"/>
<VC: axisy Title = "gold medals won"/>

<VC: dataseries renderas = "column" labelenabled = "true">
<VC: datapoint axislabel = "USA" yvalue = "35"/>
<VC: datapoint axislabel = "China" yvalue = "32"/>
<VC: datapoint axislabel = "Russia" yvalue = "27"/>
<VC: datapoint axislabel = "Australia" yvalue = "17"/>
<VC: datapoint axislabel = "Japan" yvalue = "16"/>
</VC: dataseries>
</VC: Chart>

However, it must be uncomfortable for developers. Since it is an open-source. Net Product, why cannot itProgramControl it? Sunil'sArticleI introduced how to do this:
Http://www.visifire.com/blog/2008/04/03/creating-visifire-charts-with-managed-code/#comment-31
See the followingCodeIt is clear:

Visifire. charts. Chart visichart = new visifire. charts. Chart ();
Visifire. charts. dataseries = new visifire. charts. dataseries ();
Visifire. charts. datapoint;
Visifire. charts. Title = new visifire. charts. Title ();

Title. Text = "click on chart to refresh ";
Visichart. Children. Add (title );

Visichart. width = 500; // width and height are required for the chart.
Visichart. Height = 300;

Random Rand = new random (datetime. Now. millisecond );

For (INT I = 0; I <9; I ++)
{
Datapoint = new visifire. charts. datapoint ();
Datapoint. yvalue = Rand. Next (100,100 0 );
Dataseries. Children. Add (datapoint );
}

Dataseries. renderas = "point ";
Visichart. Children. Add (dataseries );

Layoutroot. Children. Clear (); // so that chart objects don't build up each time we add one.
Layoutroot. Children. Add (visichart );

In this way, you can calculate the data in your system. The data element is actually a datapoint data type, which is very simple.
The following are related resources of visifire. Silverlight is strongly recommended.CommunityA friend of mine is really dizzy.

Official Website
Http://www.visifire.com/
Download Page
Http://www.visifire.com/download_silverlight_charts.php

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.