简体   繁体   中英

C# rendering graph

i have to render a graph in my web page.i have desigened a class( in C#) file which contain a event for rendering a graph(pie chart).In that event i pass some value ie legends which is a string[] and value which is double[] to draw the graph. But i want that instead of inserting the value directly into the event, pass that value with some function like

public void insertvalue(string[] legends,double[] values)
{

}

how could i do that plese help me???????? And i am using Zedgraphweb control to render the graph.

You can use a Key-Value pair collection such as a dictionary and use it to construct the pie chart, something like <legend, value> . You can also create a custom object that has two fields, Legend and Value and use it to build a collection such as an arraylist or a simple array. You can find information here regarding the ZedGraph Control.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM