ailon's DevBlog: Development related stuff in my life

Quick Charts for WPF & Silverlight v.1.0 Beta Released

5/10/2010 3:48:46 PM

We are happy to announce availability of feature complete version of amCharts Quick Charts for WPF & Silverlight.

Quick Charts is an easy to use, fast set of charting controls for WPF & Silverlight. And it's FREE and Open Source (Ms-PL)!

Quick Charts for WPF & Silverlight

Quick Charts motto is: Ease of Use, Speed, Small Footprint. It is amCharts Bundle's little brother. It has less features, but concentrates on what's important for the majority of users. In order to achieve this we didn't just strip the features off of amCharts Bundle, but created Quick Charts from scratch.

Check them out and, please, spread the word. Thanks!

Shout it kick it on DotNetKicks.com

amCharts Stock Chart for Silverlight Released

11/19/2009 4:21:40 PM

amCharts has just released a beta version of amCharts Stock Chart for Silverlight!

Stock Chart for Silverlight - click for live demo

This version includes all the cool advanced features of our WPF version and enables you to have spectacular advanced stock (and basically any date/time based data) charts in your Silverlight 3 applications.

Take a look at the demos, download your copy, add an advanced control to your Silverlight application and, please, help us spread the word.

kick it on DotNetKicks.com Shout it

Stock Chart 1.0 Final

10/20/2009 1:34:44 PM

DataSet comparison in Stock Chart

We have released final 1.0 version of the amCharts Stock Chart for WPF. Thanks to everyone who helps us spread the word!

kick it on DotNetKicks.com Shout it

Tags: ,

Stock Chart for WPF

10/12/2009 11:37:39 AM

WPF Stock Chart

We’ve published a release candidate of amCharts Stock Chart for WPF. Stock Chart’s main purpose is visualization of financial data but it’s suitable and very efficent at displaying any date/time based data. It’s free under linkware license even for commercial use.

Check out Stock Chart for WPF demo.

Download amCharts Stock Chart for WPF.

Btw, through the month of October 2009 we are running a 50% discount on Stock Chart licenses. Click here for details.

Tags: ,

amCharts for WPF with Scatter & Bubble Chart Support

7/10/2009 9:16:27 AM

bubble chart for WPF

We’ve released a new version of amCharts for WPF with support for Scatter (XY) & Bubble charting. Check it out and help us spread the word. Thanks!

kick it on DotNetKicks.com Shout it

Tags: , ,

amCharts for WPF 1.0 released

4/27/2009 10:49:00 AM

Pie chart, Column chart, Line chart, Mixed column and line chart

We have just released the final 1.0 version of our charts for WPF. Hooray!

Please, help me spread the word by kicking, shouting, dzoning, cross-posting and otherwise promoting the release. Thanks a million!

amCharts for WPF 1.0 Beta

3/30/2009 4:33:50 PM

 100% stacked WPF column chart

Just released the 1.0 Beta version of our WPF charts bundle. Added support for column & bar charts.

Tags: ,

amCharts for WPF: Line & Area Chart Released

3/13/2009 12:53:44 PM

Just released Line and Area charts for WPF. The announcement is here.

amCharts WPF Line and Area charts

Enjoy. And help us spread the word if you do!

kick it on DotNetKicks.com Shout it

Tags: , ,

Charts for WPF

2/18/2009 4:29:05 PM

I haven’t posted anything significant here for quite some time. That’s not because I’m lazy (that too), but because I’ve been busy working on WPF edition of amCharts. For those who don’t know, amCharts is one of the leading charting controls for web developed with Adobe Flash, and I’ve been working on charts for WPF based on the know-how gathered in 2 years amCharts been out.

WPF charts

Overall working with WPF was quite a pleasant change of scenery. There were some rought edges and you really have to turn your head around if you’ve only been dealing with web and/or Windows Forms before. But after some time you get used to it and it’s really amazing what you can do with it.

So, if you are developing for Windows Presentation Foundation platform or plan too and you need a really flexible and powerful charting solution, take a look at amCharts for WPF. And, btw, you can use it absolutely free even in commercial applications as long as you don’t mind a small link back to amCharts in the corner. Or you can purchase a commercial (link-free) license which are going with 75% discount for now.

Tags: , ,

Add Interactive Flash Charts to Your ASP.NET Web Application. Part 4: Column Chart from Code-behind

8/8/2008 10:29:36 AM

This is the fourth part in the series of tutorials showing how to add dynamic, interactive, data-driven charts to your ASP.NET web applications. These tutorials use amCharts Flash charting components and "ASP.NET Controls for amCharts" for ASP.NET integration.

This part is long overdue. Sorry for that. A tutorial on adding amCharts to ASP.NET page from code-behind was the most requested on amCharts ASP.NET controls forum. So, here we go.

Make sure you have your environment setup, ASP.NET controls for amCharts DLL added and amCharts Column chart added to your project. Details on doing that were provided in Part 1 of the series so I wont repeat it here.

Now let's add a new ASP.NET web form to our project and let's call it CodeBehindBar.aspx. We will only add a single PlaceHolder object to the markup side of our script so it looks like this:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CodeBehindBar.aspx.cs" Inherits="CodeBehindBar" %>

<!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" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:PlaceHolder ID="ChartPlaceHolder" runat="server" />
    </div>
    </form>
</body>
</html>

Now let's switch to the code-behind file.

We will be creating a column chart with two graphs and we'll use Northwind database as data source. The first graph will represent sales totals for 1997 grouped by category and divided by 1000 (just for the sake of being in the same range as our second graph). The second graph will show quantities of products in each group we have in stock.

Make sure that you have access to some SQL Server instance with Northwind database installed, connection string setup, and let's start by pulling our data from SQL Server and placing it into DataSet:

// Get data from Northwind
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString);

SqlCommand myCommand = new SqlCommand("select CategoryName, CategorySales/1000 as CategorySales from [Category Sales for 1997]", conn);
SqlDataAdapter da = new SqlDataAdapter(myCommand);
DataSet ds = new DataSet();
da.Fill(ds, "Category Sales for 1997");

myCommand.CommandText = "select CategoryName, sum(UnitsInStock) as UnitsInStock from [Products by Category] group by CategoryName";
da.Fill(ds, "Products by Category");

conn.Close();

Now it's time to create our chart. We create a ColumnChart object and setup it's DataSource. This is what will be used for the chart series (X axis).

// create column chart
ColumnChart chart = new ColumnChart();
chart.DataSource = ds.Tables["Category Sales for 1997"].DefaultView;
chart.DataSeriesIDField = "CategoryName";
chart.DataSeriesValueField = "CategoryName"; // here it's the same as ID and could've been ommited

Notice that we've specified "CategoryName" as both SeriesIDField and SeriesValueField. This isn't necessary in case like this were we have the same field for both ID and Value. It would suffice to just specify the ID, but I've added Value line so you know you can use different data fields for that.

What we've done so far is created a grid where to add actual data graphs. Now let's create 2 graphs:

// crete sales graph
ColumnChartGraph graph1 = new ColumnChartGraph();
graph1.DataSource = ds.Tables["Category Sales for 1997"].DefaultView;
graph1.DataSeriesItemIDField = "CategoryName";
graph1.DataValueField = "CategorySales";
graph1.Title = "Sales (in thousands)";

// crete stock graph
ColumnChartGraph graph2 = new ColumnChartGraph();
graph2.DataSource = ds.Tables["Products by Category"].DefaultView;
graph2.DataSeriesItemIDField = "CategoryName";
graph2.DataValueField = "UnitsInStock";
graph2.Title = "Units in stock";

and add these graphs to our chart:

chart.Graphs.Add(graph1);
chart.Graphs.Add(graph2);

What's left is just data-binding the chart and adding it to our place holder control on the page

chart.DataBind();
ChartPlaceHolder.Controls.Add(chart);

And that' basically it. This is what you should see if you run this:

 amcharts_code_behind

You can customize the look and feel by changing various properties according to your taste.

Download the source code here: CodeBehindBar.zip (1kb)

kick it on DotNetKicks.com

Copyright © 2003 - 2010 Alan Mendelevich
Powered by BlogEngine.NET 1.6.1.0