Skip to content

wwerther/Wordpress-GPX-Plugin

Repository files navigation

Gpx2Chart

Contributors: wwerther Donate link: http://wwerther.de/static/gpx2chart Tags: gpx, tracks, charts, Heartrate, Cadence, Elevation, Speed, Chart, Graphic Requires at least: 3.1.2 Tested up to: 3.3.1 Stable tag: 0.4.0

A plugin that generates nice charts from GPX-files. It put's all information about heartrate, cadence, elevation and speed into one chart.

Description

This plugin generates charts from GPX-files. The file will be processed in real-time, no intermediate data is written to the database or the wp-content directory. Currently the plugin is tested with GPX-Files generated by a Garmin-Device. The TRK-Section is parsed and information about your heartrate, your cadence and the current speed is calculated. Since GPX-files can contain a lot of data-points they can be reduced to a certain amount to guarantee, that the rendering time of the chart won't consume to much time in your browser. You can hover with the mouse over the generated chart to get detailed information about the currently selected time-instance. You can also turn off graphs that where currently shown. Every graph get its own Y-axis and color.

Current development supports Flot instead of Highcharts. It is released under MIT License and will be therefore more compatible to GPL.

Up to version 0.1.5 Highcharts-API is the only available rendering engine. Please respect their license and pricing (only Free for Non-Commercial usage).

Beginning with 0.2.0 both rendering engines are present. Support for Highcharts is not fully available any more and will be further reduced. If you still need it (because you don't want to switch to FLOT) please let me know. In other cases Highcharts will drop out in near future.

This plugin also might work with older Wordpress-Releases (3.1.x), but it depends at least on PHP v5. Please let me know if you experience problems with this.

You can find more information on the plugins-homepage that should always contain the documentation for the latest version available as well as some working examples for this plugin.

Installation

  1. Download the Plugin ZIP file
  2. Unpack the Plugin-ZIP
  3. Upload the gpx2chart folder to your wordpress plugin directory
  4. Activate the plugin through the 'Plugins' menu in WordPress

After activating the plugin you can use GPX2Chart with these shortcode:

  • [gpx2chart href="<GPX-File>" ]

There are a lot of optional-parameters. Almost all default-configurations can be overwritten on a per shortcode-base. Anyhow most likely you should change the default-configuration to adjust the layout to fit to your template and only overwrite one of the following common attributs:

  • type -> can be one of these (climbing,swimming,cycling,skiing,running). this affects the pictogram that is shown in the upper left corner
  • headline -> the text next to the pictogram
  • title -> The text below the headline. If not set it's taken from the gpx-file.
  • subtitle -> The text below the title (on the right). If not set it contains start- and end- datetime of the gpx-file.
  • maxelem -> Overwrite this value if you have large GPX files with many trackpoints. This reduces the array-size of the data embedded and increases the rendering time.
  • debug -> If this is present the PHP-module put some more information into the HTML-file
  • speed -> allows as value: 'speed', 'pace' or 'speed pace' to define what will be displayed. If not defined only speed will be displayed

Frequently Asked Questions

Where do I get the development-version?

There are several ways. You can download it from (http://plugins.svn.wordpress.org/gpx2chart/trunk/) or use the prepacked version from Wordpress when selecting "other versions" => development version. This will represent a more or less stable release. If you really want to use the bleeding-edge you need to download from GitHub. My primary development is done on this plattform. I've also added a scripts to update the subversion-directory on wordpress. So the different steps are: local copy on my computer -> github -> wordpress-svn trunk -> wordpress-svn tag tagged versions on github have the same code-base like wordpress tags.

How can I help you?

  • Send me bug reports
  • Create new profiles
  • Improve my CSS and send me the fixes..

Is there a Roadmap?

Yes, there is kind of a roadmap. But the order depends on my time.

  • Write a better documentation
  • Include a Link to the OSM-module so the Lon/Lat-Information is shown on the map, when hovering over the chart.
  • Include some more error-detection (e.g. File-Not-Found) and change the output then.

Can I add my own rendering engine

Yes, of course! I would really appreciate this. But I'm very sorry to tell, that the interfaces for additional rendering plugins are not finalized yet. They are also not really well documented. Please get in contact with me if you plan to add your own rendering engine.

Screenshots

  1. Graph1 A graph displaying the heartrate, the elevation and the speed of one track
  2. Graph2 The Tool-Tip when hovering over the chart shows even more information (time since start, distance since start)
  3. Graph3 The GPX2Chart-plugin provides a lot of settings to overwrite the default behaivour.

Changelog

0.4.0

  • updated flot-library to more recent version
  • added basic support for displaying pace

0.3.3

  • removed bundle with Highcharts API. Library is not compatible with GPL. So if you need to use Highcharts please download it yourself

0.3.2

  • Modified GPX-Parser to be a little bit more compatible for different type of GPX-files

0.3.1

  • Added function to modify profiles and styles on option page
  • Added a function to clone profiles and styles on option page

0.3.0

  • complete code rewrite
  • layout is now located in a profile-file
  • a lot of configuration can be done in the brand new plugins-configuration page to adjust the look and feel
  • tested on Chrome 17.0.963.83, Firefox 9.0.1, IE 9, IE9 (IE8+IE7 compatible-mode)

0.2.1

  • commented out some code, so the tooltips look a bit more friendly
  • Fixed depency injection for excanvas and highcharts
  • debug-mode is disabled now for production-usage
  • Use minified versions of the js-files now
  • Put strftime-function to js/helpers
  • Fixed Tooltip for IE

0.2.0

  • Change to FLOT-API as default rendering engine instead of Highcharts.
  • GPX2Chart is still shipped with both rendering engines (Flot and Highcharts)
  • Highcharts is still supported if you add render="highchart" to the option-tags. This will most likely change in future and flot will stay the only rendering engine that get's further development.

0.1.5

  • improved error-handling if href is not defined
  • improved error-handling if file could not be opened
  • additional parameters are now available (metadata, display, width, debug)
  • removed the need for the $-object. I now use jQuery directly
  • dashstyle and seriestype are now in variables
  • Introduced CSS-Classes gpx2chart, gpx2chartchart, gpx2chartmeta, gpx2chartdebug. They are not filled with life yet.

0.1.4

  • Seems like some interfaces won't work on host-europe. Interfaces are removed now

0.1.3

  • Fixed problem when using the plugins_url() function. I couldn't see this error previously, cause I did not use the automatic installation :)

0.1.2

  • Rename from ww_gpx_info to gpx2chart

0.1

  • Initial version of this plugin

Upgrade Notice

0.3.3

removed bundle with Highcharts API. Library is not compatible with GPL. SO if you need to use Highcharts please download it yourself

0.3.0

Complete Rewrite

0.2.0

Changed to FLOT-rendering API as default engine to avoid license conflicts.

0.1.5

Improved error-handling

0.1

Initial version

About

Another GPX-Plugin for Wordpress, that provides some nice graphs

Resources

Stars

Watchers

Forks

Packages

No packages published