143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
hello taking this as my third task wuju i decided to do the open flash chart as i will use it on my website too
http://code.google.com/p/google-highly- ... n=2&id=143
current ideas i have for it let you specify using a csv file the data for the chart or a sql query havent event think about how to implement them
going to do this as a component but if anybody has a better idea for it i am all ears .
http://code.google.com/p/google-highly- ... n=2&id=143
current ideas i have for it let you specify using a csv file the data for the chart or a sql query havent event think about how to implement them
going to do this as a component but if anybody has a better idea for it i am all ears .
Last edited by AmyStephen on Mon Jan 21, 2008 7:06 am, edited 1 time in total.
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
anybody any ideas ??
-
- Joomla! Fledgling
- Posts: 3
- Joined: Tue May 29, 2007 4:17 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
Hello,
I got an email from Amy saying you were doing a joomla plugin for open flash chart - good idea!!
I wrote open flash chart (with the help of lots of people) so if you have any questions, drop me an email ( http://teethgrinder.co.uk/open-flash-chart/contact.php ) or post in the forums on sourceforge.
Mail me if you need the api to change or be cleaned up in any way. Lots of people moan about how crap it is, so I'm used to it by now ;-) there are some things I'd like to do to clean it, but the libraries do most of the painful work for people, so it's not that bad...
anyhoooo... good luck :-)
monk.e.boy
I got an email from Amy saying you were doing a joomla plugin for open flash chart - good idea!!
I wrote open flash chart (with the help of lots of people) so if you have any questions, drop me an email ( http://teethgrinder.co.uk/open-flash-chart/contact.php ) or post in the forums on sourceforge.
Mail me if you need the api to change or be cleaned up in any way. Lots of people moan about how crap it is, so I'm used to it by now ;-) there are some things I'd like to do to clean it, but the libraries do most of the painful work for people, so it's not that bad...
anyhoooo... good luck :-)
monk.e.boy
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
ok going to go a little off topic first need to clear my mind. my flight was supposed to go out at 7:05am i woke up at 4:00am and the cab took 2 hours so i got 30 minutes before my flight go out on the airport i am cool i know how to get pass security and all that on time even with 2 laptops on my backpack but i forgot stuff on security so i missed my flight by 1 minute and after that i been living in the airport for 16 hours -_- cuz some guy changed my position on the flight list that i was a lower priority guy and i missed one flight so i been the whole day thinking about stuff like this extension .
monk.e.boy thanks for dropping by i really appreciate it.
so right now i am thinking of creating a custom format for generating graphs so people can paste the text and it will generate a chart base on the data.
the thing is sql querys wont do it alone i need a way for people to specify a lot of more stuff like column name chart type and other stuff so i am going to use xml with sql querys inside it.
this is a rought draft i will add more stuff into it l8r i cant think right now .
list of charts types
ill add more later gtg need to go claim my bags and charge the lappy.
monk.e.boy thanks for dropping by i really appreciate it.
so right now i am thinking of creating a custom format for generating graphs so people can paste the text and it will generate a chart base on the data.
the thing is sql querys wont do it alone i need a way for people to specify a lot of more stuff like column name chart type and other stuff so i am going to use xml with sql querys inside it.
this is a rought draft i will add more stuff into it l8r i cant think right now .
list of charts types
- pie
- line
- bar
- bar_3d
- bar_glass
- bar_outline
- bar_fade
- bar_sketch
- area_hollow
- scatter
- candle
- hlc
Code: Select all
<!-- graph types: pie, line, bar, bar_3d, bar_glass, bar_outline, bar_fade, bar_sketch, area_hollow, scatter, hlc, candle -->
<chart type="pie" height="300" width="400">
<!-- in here we define the piece of the pie inside the element tags we need put a number with the amount of this-->
<element title="Clients US">SELECT Count(client_id) FROM client_list WHERE client_location = 'US'</element>
<element>
<title_obj>
<title>Clients Puerto Rico</title>
<title_style>{font-size: 35px; color: #800000}</title_style>
</title_obj>
<data type="sql">SELECT Count(client_id) FROM client_list WHERE client_location = 'PR'</data>
<!-- in here is the url for the link of the pie slice if using pie url if not is ignored -->
<link>www.google.com</link>
</element>
</chart>
Last edited by annerajb on Sat Dec 22, 2007 12:40 am, edited 1 time in total.
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
Nice stuff going on in here.
monk.e.boy - u absolutely rock! Thanks for sharing Open Flash Chart with the world.
And annerajb, thanks for making it through security with all that computing equipment and unleashing the power of this awesome graphing utility for the Joomla! community.
That's a very cool bit of XML there.
This is going to be a very good extension.
I'll be watching as this progresses.
Thanks to both of you!
Amy
monk.e.boy - u absolutely rock! Thanks for sharing Open Flash Chart with the world.
And annerajb, thanks for making it through security with all that computing equipment and unleashing the power of this awesome graphing utility for the Joomla! community.
That's a very cool bit of XML there.
This is going to be a very good extension.
I'll be watching as this progresses.
Thanks to both of you!
Amy
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
i feel retarded i found out that open flash chart already has a format for this -_- so after my vacations i will implement it with a component
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
hmm -_- as nobody has replied i will start implementing this as a component
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
annerajb -
Did you have a question? I thought you said you decided to implement as a component. I didn't realize you were asking for opinions.
If you are asking for opinions, I suggest considering a plugin. If people are using the graphing within an article, using a plugin will allow them to embed a graph inside of a discussion.
If you create a component, you could have a gallery of graphs, but I'm not so certain how useful that would be? However, you could create the graph and store them inside of a component - so that things are organized - then use a plugin to show a graph in an article.
How do you see a component being useful? How do you plan to embed a graph in an article?
Those are some things to consider. Would be interested in hearing how you plan to put this capability into Joomla! end user hands.
I'll watch for your response.
Amy
Did you have a question? I thought you said you decided to implement as a component. I didn't realize you were asking for opinions.
If you are asking for opinions, I suggest considering a plugin. If people are using the graphing within an article, using a plugin will allow them to embed a graph inside of a discussion.
If you create a component, you could have a gallery of graphs, but I'm not so certain how useful that would be? However, you could create the graph and store them inside of a component - so that things are organized - then use a plugin to show a graph in an article.
How do you see a component being useful? How do you plan to embed a graph in an article?
Those are some things to consider. Would be interested in hearing how you plan to put this capability into Joomla! end user hands.
I'll watch for your response.
Amy
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
hmm i was thinking of creating a component for displaying one graph but what you said makes sense sorry i being so busy over this days that i havent coded anything so i have to sit down and analyze stuff thanks Amy.
to emebed the graph in the article i am going to use a data file that has all the graph data you only load the file and it does the work for you so it will something along these lines.
{graph sizeh|sizew|color|datafilepath}
happy new year everybody
to emebed the graph in the article i am going to use a data file that has all the graph data you only load the file and it does the work for you so it will something along these lines.
{graph sizeh|sizew|color|datafilepath}
happy new year everybody
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
Awesome!!! That can be automatically generated then by some type of reporting or data warehousing external function.annerajb wrote: to emebed the graph in the article i am going to use a data file that has all the graph data you only load the file and it does the work for you so it will something along these lines.
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
yeah it also can be dynamic if you use a php file to print the data file and have a dynamic chart but that will be outside of my plugin i quess as it would have to be custom made to a person need's anyway progress report got the chart working need to fix some things its going slow because i am on vacacation
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
SWEET! That's good thinking. I can see how extension developers would take advantage of this to extend the utility of their extension by using this capability.
Glad your moving forward, even if it's not as fast as you want! That's a pretty big project. It's usually a good idea to go slow to give your mind time to think of the things like you mentioned above.
Amy
Glad your moving forward, even if it's not as fast as you want! That's a pretty big project. It's usually a good idea to go slow to give your mind time to think of the things like you mentioned above.
Amy
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
the only bug i have is that apparently i cant put the javascript in the headtag because it wont work so i have to echo the javascript in the middle of the page whenever i find a graph tag.
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
To load dynamic Javascript use the last example:
Amy
Let me know if that makes sense.// Add Javascript
$document =& JFactory::getDocument();
$document->addScript( JURI::base() . 'plugins/content/example.js' );
// Load CSS
$document->addStyleSheet( JURI::base() . 'plugins/content/example.css', 'text/css', null, array( ' id' => 'StyleSheet' ) );
// Dynamic load of JS
$js = "new example().callExample({ \n";
$js .= " etc', \n";
$js .= "}); ";
$document->addScriptDeclaration($js);
Amy
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
when i mean it wont work is that i get a javascript error because it tries to run the js while the page loads and cant find the div tag best way would be to add it at the botton of the page so it dosnt slow the page down. can we get a option for addscript declaration that lets us put the js at the botton before the tag. it makes loading pages faster
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
done need to create a xml file that will create some folder copy some files but idk how
i have 2 txt files that need to be placed in this folders images\chart
that way people can upload new charts using media manager
but idk how to copy the files there using the xml installer so any help will be appreciated
i have 2 txt files that need to be placed in this folders images\chart
that way people can upload new charts using media manager
but idk how to copy the files there using the xml installer so any help will be appreciated
Last edited by annerajb on Thu Jan 03, 2008 4:21 pm, edited 1 time in total.
- jlleblanc
- Joomla! Guru
- Posts: 963
- Joined: Fri Aug 19, 2005 12:37 am
- Location: Washington, DC / NoVA
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
Hello annerajb,annerajb wrote: done need to create a xml file that will create some folder copy some files but idk how
i have 2 txt files that need to be placed in this folders images\chart
that way people can upload new charts using media manager
but idk how to copy the files there using the xml installer so any help will be appreciated
The tag described on this page might be what you're after: http://dev.joomla.org/component/option, ... stallfile/
I checked the installer code and it should be available to plugins.
Joseph L. LeBlanc: http://www.jlleblanc.com
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
what does destination means the folder where it goes?
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
ok and update it didnt work apparently it only works for components i quess my plugin is done and people will have to create the path themselves using the media manager.
i am the first version of this check it out and tell me how it works
NOTE:you have to create the chart folder under the images folder and upload the data files in the zip file manually
after that you create a chart by writing {graph width|height|datafilepath}
{graph 600|425|images/chart/data-6.txt}
i am the first version of this check it out and tell me how it works
NOTE:you have to create the chart folder under the images folder and upload the data files in the zip file manually
after that you create a chart by writing {graph width|height|datafilepath}
{graph 600|425|images/chart/data-6.txt}
You do not have the required permissions to view the files attached to this post.
Last edited by annerajb on Tue Jan 08, 2008 11:06 pm, edited 1 time in total.
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
bump need review
- jlleblanc
- Joomla! Guru
- Posts: 963
- Joined: Fri Aug 19, 2005 12:37 am
- Location: Washington, DC / NoVA
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
Hi annerajb,
Sorry for the wait. The plugin doesn't seem to have the open-flash-chart.swf file, so the output isn't displaying. I'm looking back over this thread and it looks like a component like you suggested earlier might be a better route. A plugin would still be very helpful for embedding in content items, but the flexibility needed to store and manage graph data like that would really benefit from a plugin. I'm going to talk to some of the other judges and see what they think.
Sorry for the wait. The plugin doesn't seem to have the open-flash-chart.swf file, so the output isn't displaying. I'm looking back over this thread and it looks like a component like you suggested earlier might be a better route. A plugin would still be very helpful for embedding in content items, but the flexibility needed to store and manage graph data like that would really benefit from a plugin. I'm going to talk to some of the other judges and see what they think.
Joseph L. LeBlanc: http://www.jlleblanc.com
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
where would be the best place for the swf? i currently have it on a place that will require uploading thru media manager
- jlleblanc
- Joomla! Guru
- Posts: 963
- Joined: Fri Aug 19, 2005 12:37 am
- Location: Washington, DC / NoVA
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
Assuming a plugin, you can use the section of the XML file to put your SWF under a subdirectory of /plugins/content rather than media manager. You would have /plugins/content/graphs and the file would sit in this directory. The SlideShare plugin does this: http://forum.joomla.org/index.php/topic ... msg1138258
Joseph L. LeBlanc: http://www.jlleblanc.com
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
i will release a new version in this days sorry i take classes the whole week and have test each day and i dont have a lot of free time. about the component plugin i asked and amy told me it would be more useful a plugin because people can implement it on custom pages and have chart show up and for uploading the data thats out of the scope of this as its very very advance. to create a program for generating data files.
- jlleblanc
- Joomla! Guru
- Posts: 963
- Joined: Fri Aug 19, 2005 12:37 am
- Location: Washington, DC / NoVA
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
Yes, a plugin is definitely helpful for embedding within webpages. I'm a little concerned about the file format though. An import function would definitely take a bit of time to test and develop and probably isn't entirely necessary. However, a tool that could help the end users generate simpler files would definitely be worthwhile. It appears as though there are a lot of options that you could leave out for the tool, while pointing to some documentation for advanced users.
Since you're geared up to just do flat files for the moment, go ahead and complete the plugin this way. If I hear back from the others with more news, we can revisit this.
Since you're geared up to just do flat files for the moment, go ahead and complete the plugin this way. If I hear back from the others with more news, we can revisit this.
Joseph L. LeBlanc: http://www.jlleblanc.com
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
ok finally got time to get the next version this one has localization i consider this final unless somebody else finds a bug on it or suggestion in that case i will update it.
You do not have the required permissions to view the files attached to this post.
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
I can't see any output.
I don't have this swfobject.js file. I do have a swf.js file. Is that what is needed?
If you can fix those errors and help me see the graph, we'll get it sighned off. It's a good start and getting Open Flash Chart into Joomla! is desired. Perhaps you'll continue this work. Or, others might use your learning and extend it in important ways for the community. Ah, the beauty of open source solutions!
Thanks!
Amy
I don't have this swfobject.js file. I do have a swf.js file. Is that what is needed?
This function will not work for those installing into a folder - need to have the JURI::base() in front of the folders.//add the swf object file
$document->addScript(JURI::base() ."media/system/js/swfobject.js");
Obviously, there is not a lot of time remaining to reconsider the implementation. I think Joe is right in that some type of collection point that might be better maintained with a component could be very helpful . Then, perhaps the plugin would merely run a graph already created.function getFlashJS($id, $heigh, $width, $data)
{
//$tmp = 'var so = new SWFObject("media/system/swf/open-flash-chart.swf", "ofc", "' . $heigh . '", "' . $width . '", "9", "#ffffff");
$tmp = 'var so = new SWFObject("plugins/content/open-flash-chart.swf", "ofc", "' . $heigh . '", "' . $width . '", "9", "#ffffff");
so.addVariable("data", "' . $data . '");
so.addParam("allowScriptAccess", "always" );//"sameDomain");
so.write("' . $id . '");';
return $tmp;
}
If you can fix those errors and help me see the graph, we'll get it sighned off. It's a good start and getting Open Flash Chart into Joomla! is desired. Perhaps you'll continue this work. Or, others might use your learning and extend it in important ways for the community. Ah, the beauty of open source solutions!
Thanks!
Amy
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
ok fixed that stuff should work now if anything let me know.
btw good job on the documentation workshop
btw good job on the documentation workshop
You do not have the required permissions to view the files attached to this post.
- jlleblanc
- Joomla! Guru
- Posts: 963
- Joined: Fri Aug 19, 2005 12:37 am
- Location: Washington, DC / NoVA
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
Ok, that plugin is now displaying for me. Looking nice
Joseph L. LeBlanc: http://www.jlleblanc.com
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 143 - Implement Open Flash Chart as a Joomla! v 1.5 Extension
Yes, that is very nice!
I want to see if I understand where we are. At this point, we have a plugin that can be used to generate Open Flash Chart graphs. And, that works great!
The challenge is creating those text files - and getting the files placed in a location that it can be used to generate a graph.
Currently, the site developer would manually construct these text files (suggesting a bit of knowledge of the environment), and then upload the files to a readily available location - as suggested by annerajb to be the images\charts folder.
What Joe suggests as a next step would be to create an administrative component that would create and store those files. Perhaps even generate the plugin literal to be stored within the article.
Annerajb - this task is accepted as complete. You have a usable - be it a bit on the complicated side - but the graphing environment is rich. Hopefully, you might continue working on this and develop a more user friendly component. Or, if you choose not too, someone else might building on these beginnings. This work is all here, available for review and reuse.
Get a JoomlaCode repository, if you have not already, and place a link to the download in your Google task. I'll mark it complete. (We have no more space, so we are simply adding links.)
monk.e.boy - the integration into Joomla! has begun. Thank *you* for liberating your work for others. It is FABULOUS and an entire community will enjoy your work.
Thanks!
Amy
Task closed
I want to see if I understand where we are. At this point, we have a plugin that can be used to generate Open Flash Chart graphs. And, that works great!
The challenge is creating those text files - and getting the files placed in a location that it can be used to generate a graph.
Currently, the site developer would manually construct these text files (suggesting a bit of knowledge of the environment), and then upload the files to a readily available location - as suggested by annerajb to be the images\charts folder.
What Joe suggests as a next step would be to create an administrative component that would create and store those files. Perhaps even generate the plugin literal to be stored within the article.
Annerajb - this task is accepted as complete. You have a usable - be it a bit on the complicated side - but the graphing environment is rich. Hopefully, you might continue working on this and develop a more user friendly component. Or, if you choose not too, someone else might building on these beginnings. This work is all here, available for review and reuse.
Get a JoomlaCode repository, if you have not already, and place a link to the download in your Google task. I'll mark it complete. (We have no more space, so we are simply adding links.)
monk.e.boy - the integration into Joomla! has begun. Thank *you* for liberating your work for others. It is FABULOUS and an entire community will enjoy your work.
Thanks!
Amy
Task closed