Advanced Customization with PopChart Embedder.NET

If you're the adventorous type, you can make advanced customizations to your PopChart image by accessing the embedder member of the PopChart Web Server Control. the embedder member is an instance of the PopChart Embedder object that the Web Server Control uses to embed your PopChart image.

You change embedder attributes and call embedder methods just as you would any PopChart Embedder object. Any changes you make will be applied after customizations that you make using the Web Server Control.

Note: You will only be able to see your customizations to the PopChart Embedder when you preview the web page.

For example, suppose you want to take advantage of PopChart Embedder's loadData() method. Assuming that the id of your Web Server Control is PopChart1 (the default value), you could access this method with the following code inside of your class file's Page_Load method.

Example B.5 Accessing the Web Server Control's embedder member

private void Page_Load(object sender, System.EventArgs e) 

// Put user code to initialize the page here 

PopChart1.embedder.loadData("graph","examples/data/data1.csv"); 

}

Note: You do not need to call getEmbeddingHTML(), as the PopChart Web Server Control does that for you.

For instructions on how to use the PopChart Embedder, refer to Chapter 4, "Embedding PopChart Images in a Web Page." For a complete reference of PopChart Embedder attributes and methods, refer to Chapter 4 of the PopChart Server Reference manual.