Figure 10-13. Sample ZedGraph chart
CHAPTER 10 ?– BUILDING A SAMPLE APPLICATION USING ASP.NET AJAX 243
As such, ZedGraph makes an excellent choice for use in an ASP.NET AJAX-based project
and is easy to implement in your applications. You simply make a reference to the
ZedGraph.DLL in your solution and add the ZedGraph tools to your Toolbox in the standard
way.
Drawing the Price History Graph with ZedGraph
To implement the price history graph, you can use a new web form. The Source
Code/Download area on the Apress web site (www.apress.com) contains the web form
in a file called PH.aspx. This web form contains a single ZedGraph control.
When you place a ZedGraph control from your Toolbox onto a web form, it draws the
default chart you saw in Figure 10-13. You can see the PH.aspx page in the web form
designer in Figure 10-14.
Figure 10-14. Placing the ZedGraph on a web form
The ZedGraph control fires an event upon rendering, which occurs when the page is
loaded or refreshed. This event is called RenderGraph.
In this case, the page is going to take two parameters, one for the ticker of the stock
to be rendered and the other for the number of days to render.
Pages:
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340