CCK Integration (Chartfield)
Jody Lynn - February 25, 2008 - 02:10
| Project: | Chart API |
| Version: | 5.x-1.0-0 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hi TJ,
Sorry for taking so long in doing anything for Chart API.
I finally took a look at it - really great API!
I started working on using it to create a CCK field which allows people to enter data to include charts in nodes.
I thought maybe CCK integration could be more generally useful than views integration, to just let people make a quick chart.
So far I only have it making pie charts, but it's working.
I would like to add a lot more options, improve the UI (currently I'm just using a clunky textarea for the data entry) and also incorporate your chart_save function.
Let me know if you think it could be eventually added to chart module in the contrib folder and any thoughts.
| Attachment | Size |
|---|---|
| chartfield.zip | 3.03 KB |

#1
Hello and thanks!
I took a quick look at your module, seems like an interesting idea, I was pondering at how useful it would really be to have a 'chart builder' type module, be it views, CCK, or standalone. Personally I think that the relevance of implementing the chart API would be for dynamic data mainly, but then again its hard to tell how people will want to use these things.
As far as including it in the contrib folder I should probably even take my system charts module out of there just because its harder to maintain with more and more modules bundled into one. Also not everyone may want all the modules that would end up in there.
Hard to say but keep up the work and let me know how it goes :)
#2
Ok, thanks - I'll keep working on it and make it a separate module. Not sure what people will want to do with this either.
#3
Hi,
I finished a first version of a simple module CSV chart http://drupal.org/project/csvchart. It doesn't add a CCK field, but uses the Computed Field to read the CSV data and display a chart using the Chart API.
#4
Hi codex.
Your approach seems very complex to me, in that it's asking an awful lot of the users to understand your module. I think instead of asking the user to figure out how to format all the data that I want to improve the usability and make easy fields for the user to fill out, easier than what I've already started with.
I like the idea of CSV integration, but think that should be handled with a file upload field.
#5
I agree that CSV sounds interesting, again I suppose it would be hard to 'guess' at how the data should be displayed/distributed so I think there is still a little to much guess work there
#6
Hi again,
You're right it's quite complex right now, after all it's just a working beta. Actually, your approach fits more the generic use rather than mine. I wanted to solve a very specific task and this module helped me to do it fast. I just found it convenient that I didn't have to reinvent the wheel and using the CCK Computed Field saved me a lot of time. That way making the module to work with a CSV file upload is trivial too.
As to the format of the data, well, you're right, I should remove the restrictions to make the module generic enough, this will probably be implemented later. Right now, I just pass the data the way Chart API expects them to be, in order to save some extra processing.
#7