I'm embarrassed to admit I can't remember exactly which flash charting
solution I went with, but I believe it was XML/SWF:
http://www.maani.us/xml_charts/index.php?menu=Introduction

You can see it here: 
http://classicmotorsports.net/project-cars/1970-datsun-240z/
Scroll down to "on the dyno", then click on the Aug. dyno run.

Using it is pretty simple. All the flash stuff is in my media folder.
Object tag in the page template looks like this:
<object type="application/x-shockwave-flash" data="/media/flash/
charts.swf?library_path=/media/flash/
charts_library&amp;xml_source=dyno_run.xml"
        width="700" height="375" id="dynoRun" >
                <param name="movie" value="/media/flash/charts.swf?
library_path=/media/flash/charts_library&amp;xml_source=dyno_run.xml" /
>
                <param name="flashVersion" value="8" />
       </object>

You'll note it calls dyno_run.xml
the path to that is defined in my urls.py so as far as Flash is
concerned, it's a relative url to the page calling it
(r'^project-cars/(?P<slug>(\w|-)+)/dyno-runs/(?P<object_id>\d+)/$',
'classic.projects.views.get_dyno_runs'),

In views, I'm just gathering up whatever data I want to plot, so I
won't bore you with that.

Then, the dyno_run.xml is pretty straightforward:
<chart>
        <axis_value bold='false' size='10' />
        <axis_category skip='4' bold='false' size='10' />
        <chart_grid_v thickness='1' color='cccccc' />
        <chart_pref line_thickness='2' point_shape='none' />
        <chart_type>line</chart_type>
        <legend_transition type='zoom' duration='.5'  />
        <legend_label size='14'   />
    <chart_value position='cursor' size='12' color='000000'
background_color='cccccc' alpha='70' />
        <chart_data>
                <row>
                        {% for item in run_values_list 
%}<string>{{item.rpm}}</string>{%
endfor %}
                </row>
                <row>
                <string>Horsepower</string>
                {% for item in run_values_list %}<number>{{item.hp}}</
number>{% endfor %}
        </row>
        <row>
                <string>Torque</string>
                {% for item in run_values_list %}<number>{{item.torque}}</
number>{% endfor %}
        </row>
        </chart_data>
</chart>


On Jan 17, 9:20 am, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> I've been considering this, but haven't gotten around to actually
> doing so. Keep us posted if you have any success.
>
> -Gul
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to