Creating animations with Dundas Chart for ASP.NET

Editorial Note

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

This is a showcase review for our sponsors at CodeProject. These reviews are intended to provide you with information on products and services that we consider useful and of value to developers.

Introduction

Dundas Chart for ASP.NET Enterprise Edition, version 4.0 now includes the tools you need to create stunning animated charts without writing a single line of code.

When to use animated charts?

Animated charts add depth to your data. They highlight valuable information and support memory retention. If you need to emphasize a Data Point when it reaches a critical value – a pressure value, high/low sales numbers, or a stock sell price - an animated chart ensures your point will be made and remembered.

Dundas Chart animations are extremely useful in online marketing or presentation scenarios. They have the power to draw viewer attention to the most impactful and relevant data. Using an animated chart format to present your firm’s sales performance over time, relative to the industry standard, creates an impressive backdrop for a sales presentation

The Simplicity of Creating Animated Charts

Dundas Chart for .NET Enterprise Edition enables you to design charts without having to write any code. Using the Dundas Chart Wizard, you can design the appearance of the chart, bind it to your data source and use the Visual Studio property browser to set your animation properties.

Dundas Chart for ASP.NET Enterprise Edition is able to animate your data in either Flash or SVG formats. The first step is to decide the output type:

Figure 2: Selecting the to render to Flash

// set the render format to be Flash
Chart1.ImageType = ChartImageType.Flash;

At this point, the rendering format of a static chart has been selected. The chart will be rendered in Flash in the same manner that a Png or a Jpg would be rendered. Next, an animation theme needs to be selected, or a custom animation must be created. Animation themes have been added to provide common animations to your chart if applicable, thus reducing unnecessary development. Custom animations give the developer full control of an animation sequence; it can be used to set which element is animated, how to animate it (moving, growing or fading animation) and the timing of the animation.

Whether using themes or custom animations, the developer retains the ability to control both the time period and restart properties of the animation.

Figure 3: Selecting an Animation Theme

Figure 4: Defining the Animation to Repeat with a delay

// set the Animation Theme to Grow elements together
Chart1.AnimationTheme = AnimationThemes.GrowingTogether;
// set to repeat the animation after a 3 second pause
Chart1.AnimationDuration = 7;
// set to repeat the animation after a 3 second pause
Chart1.RepeatAnimation = true;
Chart1.RepeatDelay = 3;

Using the above property settings the following chart animation can be created in minutes.

Creating Custom Animated Charts

The animation themes are perfect for making your animated charts and will satisfy the majority of your needs. However, like other chart features provided, there is an easy and powerful way to customize the presentation of your data. Custom animations provide high-end results while maintaining simplicity in development.

Custom animations provide full control of the chart elements, allowing each element to be animated and sequenced as desired.

The above example of animation can be modified so that the line series draws independently of the animation theme, the chart area axis lines and grid lines are removed from the GrowingTogether animation theme, and the title slides in from the right. The result:

There are three tasks to complete. The first will modify the GrowingTogether animation theme to remove the 'fading in' of the axis lines and grid lines. This is done by creating a FadingAnimation object and adding chart elements to the animation object. Since the goal is to disable a set of chart elements from the animation theme, the Enabled property will be set to false and the object will be added to the Chart Animation Collection.

The second task is to create a GrowingAnimation object and add it to the Chart Animation Collection. This animation object consists of the Line chart series. Setting the OneByOne property to true will cause the line to grow point by point over the time specified for the animation sequence.

Finally, to give the chart title a sliding in effect, a MovingAnimation object is added. Moving animations provide an X and Y coordinate (in percentage of the chart) to define where the move will begin; The StartPositionX is set to be 100% of the width of the chart so that the text is initially out of view. The StartTime and Duration is set so that this is one of the last objects to be animated.

The above example is a fairly simplistic custom animation. With the API provided and the ability to animate each chart element independently, the developer has full creative control. The animation possibilities are far too varied to be fully demonstrated here, so to see additional examples visit the Dundas Chart Gallery (see link below), or download a full evaluation copy of Dundas Chart for ASP.NET Enterprise Edition here.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

Share

About the Author

Since 1992 Dundas Data Visualization has been helping companies all over the world visualize their data. Dundas products have a global reputation of being the highest quality, and are all designed, built and tested to meet the strictest requirements that developers and business managers demand.

Our web-based dashboard software comes with wizard interfaces, and a unique Dundas DashFlowTM process, allowing for the simultaneous development of an executive dashboard by business analysts, IT staff and database administrators. It also uses premier charts, maps, gauges and graph controls, letting end-users visualize their data as required.

Dundas also offers superb, world class consulting services for those companies that do not have the in-house expertise to implement their data visualization projects.

The quality of our products in conjunction with our unmatched technical support, numerous awards and years of experience reflect Dundas Data Visualization's commitment to being the best!

#2. If yes, how does it perform with zooming and scrolling with 1 million data point? Becase MSChart control can also display 1 million data points, but becomes extremly slow when the chart resized/zoomed/scroled.

#3. Dose it have any built-in smart algorithm for point selection such that it only draws the points that are currently visible on the screen?

Have you found a solution to this? Or does anyone have an answer to this? I'm getting the same error and I'm not sure what feature it is complaining about because I tried removing all of my chart settings and no dice.

I thought hey this looks good! I can use this for a specific project were crystal would be overkill. After seeing the 3000.00 price tag I have to roll my own.
Nice job guys, really, but 3000 *is* too much. Photoshop CS is only $700 / Macromedia suite is less then $1000 (1200 if you get all the goodies)

I am all about making some coin. I appreciate the added value of a great tool I neither develop nor support. I bought codesmith for that very reason ($300 BTW). Your product while it looks fabulous is a very specific solution I don't believe youre price point is in the right area.

I guess in closing I wanted to be positive and provide an opinion that could be used to make my point as I am sure I am not the only one who you priced out of the proverbial neighborhood.

I think 3K is fair. It really dovetails nicely with VS, and my boss was more than willing to pay the cash for the functionality.
If you have the time to write your own then hey go for it. For me there is just too much to gain from this product for me to go and write it all on my own.

Woah. This is in the Product Showcase section, which is where articles are placed describing products by CodeProject's premium sponsors. This is meant soley to sell software, and is completely allowed.

As for Dundas Chart for ASP.NET, you've obviously never used it or you wouldn't be saying that.

you know for a person that likes to argue, you sure dont post alot... 3 total messages, he has no profile no nothing, I bet he never heard of 'buying' products. His sources are probably some unknown ftp site, warez site or even kazaa, thats why he thinks its spam.

Anywayz great product, other then the fact that you got one bad comment doesn't mean anything, one question though... do the charts always repeat, or can you make them only be rendered once? Also great graphics, especially for asp.net.

The charts in this article were designed to repeat. The chart has a RepeatAnimation property that controls the repeating of all animation sequences as well as a Repeat property for each sequence. In the above examples, the Chart.RepeatAnimation property was set to true.

Dundas is a big supporter of this site, and as David Wulff pointed out, this IS the "product showcase" section. I'd probably delete my post if I were you, just as an apology, or at least delete the rant. I hate spam as much as the next person, believe me.

I've heard good stuff about Dundas software, too; I hope to get my boss to buy it for a reporting application I have to do at work. It's so good that Microsoft chose Dundas to do the charting code for the new version of SQL Server reporting services. I still haven't gotten a chance to play with it myself, but if you go to their site there are samples of the graphs you can make with their software. It's obviously had lots of decent work put into it.

No apology is needed. I see that indeed the article is posted under "product showcase". So be it. I have no problem with that.

However, it is ALSO posted on this main page/link: http://codeproject.com/?cat=2 where it does not belong. It is this location that I originally referred to. Not "product showcase".

Not that it's the end of the world or anything, but when presented on "this" page, it comes across as spam. That's all.

And please, give me a break Mr. Anonymous. You, and all of the other posters to date obviously work for Dundas. No one is fooled. Your comments are not unbiased. Just self promoting.

The fact that I would not be interested in your product does not make me ignorant, as you guys have implied. I am entitled to my opinion. Your insulting remarks to a "non sale" just shows what little business sense you have. Are you going to insult everyone who is not interrested in your product? What an interresting sales approach you have.

Paddy Wack wrote:No apology is needed You should be the one apologizing here. As everyone else has pointed out, there is SUPPOSED to be product pitches here. I tried that link you mentioned, just to be sure, and the ONLY place I found the word Dundas was in the Sponsors section.

Trust me, it was there as of 7 PM EST on 5/3/2004 when I posted my original comment. Apparently, the good folks at "The Code Project" must have also recognised it as spam when presented in such a manner. In thier infinate wisdom, they seem to have removed the link from that particular location.

Again, I have no problem with your product being advertised in the "show case" area. Best of luck to you.

I just don't think that companies should pitch thier goods in the "open source" area, where it comes across as spam. This is a peception that I'm sure you don't want.

And please, don't argue back with me. I'm just trying to give you some friendly advise. Take it or leave it. Good Day.

Paddy Wack wrote:Again, I have no problem with your product being advertised in the "show case" area

It's... not my product. I work for a finacial firm in Portland. It just seemed like you went off a little on Dundas for posting here when they have every right to. If the link was on a forum or what not, then yes, it need to be removed. But you also have to understand what I and everyone else who responded to you were saying. I mean, WE didn't see the other link, so it certainly looked like you were knocking Dundas here.