Sunday, December 09, 2007

Updated NGChart library (.NET wrapper for Google Chart API)

NGChart was updated with the new features:

Bar charts

Pie charts with labels

Chart title

And the project wiki now has Samples page.

Labels: , , , , , , , , ,

19 Comments:

Blogger Adam said...

Do you have an example showing how the Extended Encoding works?

3:34 PM  
Blogger digizzle said...

Hi Adam,

NGChart will try to automatically detect the required encoding. I've put more details to the project page related to data encoding.

Please, make sure you have the latest version of NGChart (NGChart releases).

Regards,
Eugene

2:53 PM  
Blogger Gregory said...

Hi Eugene,
2 quick questions.
+ I downloaded 0.5 and tried to add a bar chart and got this error:
No overload for method 'Chart' takes '4' arguments. (I get this error when copying the example for bar charts)
+ Is there a way to select a min/max for the axis on line charts?
Thank you so much for this great control, it makes interacting with google a lot smoother!

Gregory

1:09 AM  
Blogger digizzle said...

Hi Gregory,

Yes, you were right - I forgot to update the bar chart example. It's fixed now, and available at the Samples page.

Regarding the "min/max for the axis" - no, it's not available yet. The data scaling was recently introduced by google, and the NGChart is not in sync yet. I'll update the library soon.

Thanks for the interest in the library,
Eugene

1:38 PM  
Blogger nunu said...

Hey, I've been working to extend this project trying to follow your guidelines. I was wondering if you would like to me to add the source files to the SVN repository?

I basically added all the properties to the line chart (axis type/labels/range)

10:21 PM  
Blogger digizzle said...

Hi nunu,

If you'd like - I can add you as a project member to the NGChart, so you can commit your changes directly... after reviewing the code I'll create a new release of the library.

Or if you prefer - you can send me the patch with your changes, and I'll apply everything by myself.

- Eugene

2:35 PM  
Blogger nunu said...

hey, yea, why dont you add me as a member. I'd definitely like you to check out what i've done and modify it as you see fit.

you'll see that i tried to follow your lead on most things, problem is, these more 'advanced' parameters are arrays of arrays...well you'll see when i get the code in.

And great library! Got me up and running in no time, thanks.

how do we exchange emails so we dont have to comment back and forth?

8:23 PM  
Blogger digizzle said...

Just send me your Google Account email address to erymski@gmail.com, and I'll add you as a member.

- Eugene

5:02 PM  
Blogger TarekAHF said...

Great work !

I wanted to use NGChart to save/download the result chart as an Image File to a local web folder for later use. Is this possible ? How ?

I tried to use this function "SaveFileFromURL" from this link:

http://geeknotes.wordpress.com/2008/01/10/saving-a-possibly-binary-file-from-a-url-in-c/

But I am getting Error

The remote server returned an error: (403) Forbidden.

Please help.

Tarek.

6:15 AM  
Blogger digizzle said...

Hi Tarek,

Can you see the chart by opening the generated url in a browser?

If you can - I guess the 403 error is related either to your configuration, or to the function you are trying to use, but not to NGChart library.

Regards,
Eugene

3:42 PM  
Blogger TarekAHF said...

Hi digizzle,

Thank you for your reply.

I found the cause of the problem. It was due to trying to download the image using HttpWebRequest from ASP.NET Application which is using the authenticated identity of the worker process, and it was running behind a firewall/proxy.

I had to enable Proxy Setting on the Machine Level, this way, I could use the default proxy and its related credential from the Cache Credential and all worked successfully.

Tarek.

6:17 PM  
Blogger TarekAHF said...

Ok, I started using NGchart, and it is really cool.

I have the following comments:

1. The Data I want to display as a chart is in a table/Database. I am loading the Table into DataSet using ADO.NET Adapters, then converting the DataSet into Array (using for/next loop) so that I can create the NGChart Object. I could not find a direct way to convert DataSet to Array directly. Actually, this is a bit lengthy/complex process. I was hoping there is a way to link the NGChart Data Sets to a .NET DataSet Object Directly, this is becuase DataSet/DataView/DataTable are the most natural way to have a memory store of the Table Data from SQL Database.

2. I created a PieChart NGChart Object to draw the Count of Staff in the company by Nationality. The total records after grouping the result by Nationality is 64 records. The result looked very ugly ! I tried to play with the chart size, no luck, still looks ugly and crowded. Also, the default color selection for each nationality is same color, but different degree, and you cannot see any separator between Nationalities on the PieChart. I tried to set a different color for each Nationality by loading an Array of Colors, but I could not find out how to do that easily. I wanted to convert the color set of System.Drawing.Color to Array so that I can use an Index to select the color, from 0 to 63 (64 Nationalities) or something like that, but I failed to do that. I was wondering if there is a way to use Automatic Distinct Color Selection for each Nationality.

Please help.

Tarek.

6:37 PM  
Anonymous Anonymous said...

any idea how this could be extended to support the new qrcodes feature?

9:22 AM  
Blogger digizzle said...

QR codes support added in v.0.6 of NGChart.

- Eugene

8:48 AM  
Blogger Gregory said...

Hello Eugene (and to extension nunu given my question). Updated to .6 today and it's working quite well.
Would you have an example of how one can setup and use AxisType, AxisLabels, and AxisRange.
I'd love to see how they can change the rendering of a LineChart.
Thank you!

5:19 PM  
Blogger Sunil Ghimire said...

Hello digizzle

I am trying to generate a 2D-pie chart with values 6000 and 4000.
But it shows that the range is between 0-4092.Please help me to fix the problem


Sunil

4:07 AM  
Blogger digizzle said...

Hello Sunil,

Unfortunatelly, 4095 - it's a max allowed value by the Google Chart API (for more details check http://code.google.com/apis/chart/docs/data_formats.html#overview).
As a workaround you can scale the input values to fit to the [0..4095] range.

Regards,
- Eugene

11:25 AM  
Blogger trelos said...

Hi, I just wanted to know if this project is still active... I have made some additions like styling (background and grid), plus support for map chart... If you're interested I can sumbit my additions

9:15 AM  
Blogger digizzle said...

Hi Trelos,

Sorry for the delay, I'm rarely checking this account lately.

If you want to contribute, just let me know, and I'll add you as a member to the project.

Regards,
- Eugene

5:48 PM  

Post a Comment

<< Home