Activity Sparks
Activity Sparks is a highly customizable widget to display a “sparkline” style graph in your sidebar indicate post and/or comment activity. This plugin leverages Google’s Chart API, so does not require the PHP GDI library. Customization options include Title, size, colour, background transparency, c
Activity Sparks is a highly customizable widget to display a “sparkline” style graph in your sidebar indicate post and/or comment activity. This plugin leverages Google’s Chart API, so does not require the PHP GDI library. Customization options include Title, size, colour, background transparency, caching period, activity granularity and period.
A closer look.
- 01Upload activitysparks.php to the /wp-content/plugins/ directory of your WordPress installation
- 02Activate the plugin through the ‘Plugins’ menu in WordPress
- 03The widget can now be configured and used from the Appearance -> Widgets menu
Frequently asked questions.
Can I use it if I don’t want to call a widget in the sidebar?
Basic template tag support was added in v0.3. The following code checks for plugin activation and renders with the default settings.
<?php if(function_exists('activitysparks')) { activitysparks(); } ?>
To change the default settings you must pass an array of the parameters you wish to alter. These are the available parameters and valid values
- dataset = ‘posts’, ‘comments’, ‘both’ or ‘legend’
- width_px = positive integer
- height_px = positive integer
- period = 1, 7, 14, 30, etc. (number of days to group by)
- ticks = positive integer (number of periods to display)
- chma = 0 or positive integer (chart margin px)
- bkgrnd = 6 character hex value (e.g. FFFFFF) or ‘NONE’ for transparency