ZedGraph Unlocked


I was working on reporting application where I just need to create graphs and paste them on PDF file. For this I choose ZedGraph Control. It is perfect library I found. Although no new development is done on it lately. But they have nothing to code in it anyways.  They have good wiki and active forum to discuss. Anyways, previously when I use this library for same situtation i was not very sure how I use it only to create Graph file on disk. What I did was I use a Hidden Control on my Window Form application with its visibilty set to false. then I draw Graph on it and save the graph from that hidden form. Since it is a control I doesn’t know if there is any better way of doing it is available or not.

But today I thought to experiment a bit. I simply create a Class file in my application, import ZedLibrary in that class file. Create an object of ZedGraph Control within my class, Set all values that are set in my old application’s initilizecomponent function, and create disk graph as I do previously. And it works!!! i know this sound “obvious” thing to whom that know a control cannot be used without making its instance on form. But for those who are not very mature like me, they might not know this. Also, some controls are graphic bound (due to bad coding only). But seriously ZedControl is perfect in that manner.  

I learn a new thing today in .NET framework, that really tells why it is true object oriented and what we see on screen is only CODE at the end of day, so there is nothing to worries about the display if you can control it through property and methods.  

Now let me finish my project first :).

, , ,

One response to “ZedGraph Unlocked”