Plugin Directory

Changeset 809273


Ignore:
Timestamp:
11/23/2013 11:39:48 AM (12 years ago)
Author:
thmufl
Message:

ip4 template engine added

Location:
ipu-chart
Files:
11 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ipu-chart/tags/0.8/css/ipu-chart.css

    r721286 r809273  
    1 figure.chart {
    2   //border: 2px solid lightgray;
    3   //padding: 20px;
     1.ipuc {
     2    font-size: 0.8em;
    43}
    54
    6 .chart figcaption {
    7   //border: 2px solid yellow;
    8   //font: 0.9em sans-serif;
    9 }
    10 
    11 figure .legend {
     5.ipuc .legend {
    126    fill: dimGray;
    137    stroke: dimGray;
     
    1610}
    1711
    18 .chart svg {
    19   //border: 2px solid red;
    20   font: 0.8em sans-serif;
     12.ipuc p.error {
     13    color: blue;
    2114}
    2215
    2316/* Map chart definitions */
    2417
    25 .ISO-3166-1 {
    26     //color: transparent;
     18.ipuc .ISO-3166-1 {
    2719    font-size: 0.8em;
    2820}
    2921
    30 .stroke {
     22.ipuc .stroke {
    3123  fill: none;
    3224  stroke: dimgray;
     
    3426}
    3527
    36 .fill {
     28.ipuc .fill {
    3729  fill: #fff;
    3830}
    3931
    40 .graticule {
     32.ipuc .graticule {
    4133  fill: none;
    4234  stroke: #777;
     
    4537}
    4638
    47 .boundary {
     39.ipuc .boundary {
    4840  fill: none;
    4941  stroke: #fff;
     
    5244
    5345/* Bubble chart definitions */
    54 .node {
     46.ipuc .node {
    5547
    5648}
    5749 
    58 .node .leaf {
     50.ipuc .node .leaf {
    5951}
    6052
    6153/* Pie chart definitions */
    62 .arc path {
     54.ipuc .arc path {
    6355  stroke: white;
    6456}
     
    6658/* Line chart definitions */
    6759
    68 .line {
     60.ipuc .line {
    6961  fill: none;
    70   stroke: black;
     62  stroke: dimGray;
    7163  stroke-width: 1.5px;
     64  shape-rendering: crispEdges;
    7265}
    7366
    74 .dot {
     67/*
     68.ipuc .dot {
    7569    fill: dimGray;
    7670}
     71*/
    7772
    7873/* Axis definitions */
    79 
    80 .axis {
     74   
     75.ipuc .axis {
    8176    stroke: lightGray;
    8277    stroke-opacity: 0.8;
     
    8479}
    8580
    86 .x.axis {
     81.ipuc .x.axis {
     82
    8783}
    8884   
    89 .x.axis path {
     85.ipuc .x.axis path {
    9086    fill: none;
    9187    stroke-opacity: 0.2;
    9288}
    9389   
    94 .x.axis * line {
    95 //stroke-dasharray: 9,5;
    96 }
    97    
    98 .x.axis * text {
     90.ipuc .x.axis * text {
    9991    stroke: dimGray;
    10092    stroke-width: 0.1;
     
    10294}
    10395
    104 .x.label {
     96.ipuc .x.label {
    10597    fill: dimGray;
    10698    stroke: dimGray;
     
    109101}
    110102
    111 .y.axis {
     103.ipuc .y.axis {
    112104}
    113105   
    114 .y.axis path {
     106.ipuc .y.axis path {
    115107    fill: none;
    116108    stroke-opacity: 0.2;
    117109}
    118      
    119 .y.axis * line {
    120     //stroke-dasharray: 9,5;
    121 }
    122110
    123 .y.axis * text {
     111.ipuc .y.axis * text {
    124112    stroke: dimGray;
    125113    stroke-width: 0.1;
     
    127115}
    128116
    129 .y.label {
     117.ipuc .y.label {
    130118    fill: dimGray;
    131119    stroke: dimGray;
     
    137125
    138126div.iputooltip {
    139     font: 0.75em sans-serif;
    140     line-height: 1.0;
     127    font: 0.8em sans-serif;
     128    line-height: 1.2;
    141129    color: Black;
    142130    position: absolute;
    143     padding: 5px 10px 5px 10px;
    144     background: GhostWhite; //#faf8ba; #ffffcc;
     131    padding: 4px 4px 4px 4px;
     132    background: #FCFCFC;
    145133    border-radius: 2px;
    146     //border: 1px solid lightgray;
    147     //box-shadow: 10px 10px 5px lightgray;
    148134}
    149135
     
    152138    width: 40%;
    153139    margin-right: 10px;
    154     //font-weight: bold;
    155140}
     141
     142
     143
     144
     145
     146
  • ipu-chart/tags/0.8/ipu-chart.php

    r767897 r809273  
    55    Description: D3/SVG based charts out of your csv, tsv or json data. Currently supports bar, pie, donut, line, scatter, bubble and world map charts.
    66    Author: Thomas Müller Flury, ipublia
    7     Version: 0.7.3
     7    Version: 0.8
    88    Author URI: https://www.ipublia.com/author/thmufl/
    9     Text Domain: ipuchart
     9    Text Domain: ipuc
    1010    Domain Path: /lang
    1111 */
     
    3232        $content = str_replace("<br />", "\r", $content);
    3333    }
     34    $content = str_replace(array("&#8216;", "&#8220;", "&#8221;", "&#8242;", "&#8243;"), "\"", $content);
    3435    $content = trim($content);
    3536    return ipuc_render_csv($id, do_shortcode($content));
     
    4546        $content = str_replace("<br />", "\r", $content);
    4647    }
     48    $content = str_replace(array("&#8216;", "&#8220;", "&#8221;", "&#8242;", "&#8243;"), "\"", $content);
    4749    $content = trim($content);
    4850    return ipuc_render_tsv($id, do_shortcode($content));
     
    5860        $content = str_replace("<br />", "\r", $content);
    5961    }
     62    $content = str_replace(array("&#8216;", "&#8220;", "&#8221;", "&#8242;", "&#8243;"), "\"", $content);
    6063    $content = trim($content);
    6164    return ipuc_render_json($id, do_shortcode($content));
    6265}
    6366
    64 // This is the chart tag
     67// This is the chart tag. Will be replaced by the chart-def tag.
    6568function ipuc_chart_func($atts) {
    6669    extract(shortcode_atts(array(
     
    9194}
    9295
     96// The ip4 tag
     97function ip4_func($atts, $content = null) {
     98    extract(shortcode_atts(array(
     99        'log' => 'ip4.log.level.warn'
     100    ), $atts));
     101   
     102    if(has_filter('the_content', 'wpautop')) {
     103        $content = str_replace("<br />", "", $content);
     104    }
     105    $content = trim($content);
     106    return ip4_render($log, do_shortcode($content));
     107}
     108
    93109// This is the table tag (deprecated)
    94110function ipuc_table_func($atts) {
     
    105121add_shortcode("csv", "ipuc_csv_func");
    106122add_shortcode("tsv", "ipuc_tsv_func");
    107 add_shortcode("json", "ipuc_tsv_func");
     123add_shortcode("json", "ipuc_json_func");
    108124add_shortcode("chart", "ipuc_chart_func");
    109125add_shortcode("table", "ipuc_table_func");
     126
    110127
    111128// Second shortcode set for compability with some themes.
    112129add_shortcode("ipu-csv", "ipuc_csv_func");
    113130add_shortcode("ipu-tsv", "ipuc_tsv_func");
    114 add_shortcode("ipu-json", "ipuc_tsv_func");
     131add_shortcode("ipu-json", "ipuc_json_func");
    115132add_shortcode("ipu-chart", "ipuc_chart_func");
    116133add_shortcode("ipu-table", "ipuc_table_func");
     134
     135// ip4 shortcode since version 0.8
     136add_shortcode("ip4", "ip4_func");
    117137
    118138function ipuc_render_csv($id, $content) {
     
    139159                </table>";
    140160    } else {   
    141         return "<figure id='{$id}' class='chart'>
     161        return "<figure id='{$id}' class='ipuc'>
    142162                    <script type='text/javascript'>
    143163                    renderChart(\"{$id}\", \"{$csv}\", \"{$tsv}\", \"{$json}\", \"{$type}\", \"{$category}\", \"{$value}\",
     
    150170}
    151171
     172function ip4_render($log, $content) {
     173
     174    $content = str_replace(array("&#8220;", "&#8221;", "&#8222;", "&#8242;", "&#8243;"), "\"", $content);
     175    $content = str_replace(array("&#8216;", "&#8217;"), "'", $content);
     176    $content = str_replace("&#8211;", "-", $content);
     177    $content = str_replace("\n", "", $content);
     178    $content = preg_replace('/\s+/', ' ', $content);
     179       
     180    return "<script type='text/javascript' encoding='utf-8'>
     181                ip4.draw({$content});
     182            </script>";
     183}
     184
    152185function ipuc_render_table($id, $csv, $title, $debug) {
    153186    return "<table id='{$id}' class='chart-data'>
     
    160193// Add plug-in's scripts to the header of the pages
    161194function ipuc_add_custom_scripts() {   
    162     wp_register_script('custom-script-d3', plugins_url( '/js/d3/d3.v3.min.js', __FILE__ ));
     195    //wp_register_script('custom-script-d3', plugins_url( '/js/d3/d3.v3.min.js', __FILE__ ));
     196    wp_register_script('custom-script-ip4-v0', plugins_url( '/js/ip4.v0.min.js', __FILE__ ));
     197    wp_register_script('custom-script-ipuc', plugins_url( '/js/ipu-chart.js', __FILE__ ));
    163198    wp_register_script('custom-script-queue', plugins_url( '/js/d3/queue.v1.min.js', __FILE__ ));
    164199    wp_register_script('custom-script-d3-geo-projection', plugins_url( '/js/d3/d3.geo.projection.v0.min.js', __FILE__ ));
    165200    wp_register_script('custom-script-topojson', plugins_url( '/js/d3/topojson.v0.min.js', __FILE__ ));
    166     wp_register_script('custom-script-ipuc', plugins_url( '/js/ipu-chart.js', __FILE__ )); 
     201    wp_register_script('custom-script-colorbrewer', plugins_url( '/js/colorbrewer/colorbrewer.js', __FILE__ ));
    167202 
    168     wp_enqueue_script('custom-script-d3');
     203    //wp_enqueue_script('custom-script-d3');
     204    wp_enqueue_script('custom-script-ip4-v0');
     205    wp_enqueue_script('custom-script-ipuc');
    169206    wp_enqueue_script('custom-script-queue');
    170207    wp_enqueue_script('custom-script-d3-geo-projection');
    171208    wp_enqueue_script('custom-script-topojson');
    172     wp_enqueue_script('custom-script-ipuc'); 
     209    wp_enqueue_script('custom-script-colorbrewer'); 
    173210}
    174211add_action('wp_enqueue_scripts', 'ipuc_add_custom_scripts' );
     
    176213// Add plug-in's stylesheets to the header of the pages
    177214function ipuc_add_custom_styles() { 
    178     wp_register_style('custom-style', plugins_url( '/css/ipu-chart.css', __FILE__ ), array(), '0.9', 'all' );   
    179     wp_enqueue_style('custom-style'); 
     215    wp_register_style('custom-style-ipuc', plugins_url( '/css/ipu-chart.css', __FILE__ ), array(), '0.7', 'all' );   
     216    wp_register_style('custom-style-ip4-v0', plugins_url( '/css/ip4.v0.css', __FILE__ ), array(), '0.8', 'all' );
     217    wp_enqueue_style('custom-style-ipuc'); 
     218    wp_enqueue_style('custom-style-ip4-v0');
    180219
    181220add_action('wp_enqueue_scripts', 'ipuc_add_custom_styles' );
    182221
    183 // Add settings page (licenses etc.)
    184 function ipuc_settings_menu() {
    185     add_menu_page('IPU-Chart Plugin Settings', 'IPU-Chart', 'administrator', __FILE__, 'ipuc_settings_page', plugins_url('img/ipuc-icon-16x16-bw.png', __FILE__));
    186 }
    187 add_action('admin_menu', 'ipuc_settings_menu');
    188 
    189 require_once IPUC_PLUGIN_DIR . 'include/settings.php';
    190 
    191222?>
  • ipu-chart/tags/0.8/js/ipu-chart.js

    r767897 r809273  
    569569                .attr("r", function(d) { return d.r; });               
    570570    }
    571        
     571
    572572    if(touch_device) {
    573573        d3.selectAll(".leaf circle")
     
    11871187   
    11881188function showTooltip(d) {
     1189   
    11891190    d3.selectAll(".bar").transition()
    11901191        .duration(100)
  • ipu-chart/tags/0.8/license.php

    r721286 r809273  
    11<?php
    2 /*  Copyright 2013  Thomas Müller Flury, ipublia  (email : thmufl@gmail.com)
     2/*
     3    ip3 - Templates for d3 and more.
    34
    4     This program is free software; you can redistribute it and/or modify
    5     it under the terms of the GNU General Public License, version 2, as
    6     published by the Free Software Foundation.
     5    Copyright (C) 2013  Thomas Müller Flury <thmf@ipublia.com>
    76
    8     This program is distributed in the hope that it will be useful,
    9     but WITHOUT ANY WARRANTY; without even the implied warranty of
    10     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    11     GNU General Public License for more details.
     7    This program is free software: you can redistribute it and/or modify
     8    it under the terms of the GNU General Public License as published by
     9    the Free Software Foundation, either version 3 of the License, or
     10    (at your option) any later version.
    1211
    13     You should have received a copy of the GNU General Public License
    14     along with this program; if not, write to the Free Software
    15     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     12    This program is distributed in the hope that it will be useful,
     13    but WITHOUT ANY WARRANTY; without even the implied warranty of
     14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15    GNU General Public License for more details.
     16
     17    You should have received a copy of the GNU General Public License
     18    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1619*/
    1720?>
  • ipu-chart/tags/0.8/readme.txt

    r767897 r809273  
    33Tags: chart, chart editor, bar chart, pie chart, line chart, donut chart, scatter chart, bubble chart, world map, map, countries, animation, quotes, diagram, csv, tsv, json, excel, numbers, svg, d3, d3js
    44Requires at least: 3.0.1
    5 Tested up to: 3.6
    6 Stable tag: 0.7.3
     5Tested up to: 3.7.1
     6Stable tag: 0.8
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 Create D3/SVG based charts out of a remote data service or spreadsheet data (csv, tsv or json).
     10Add beautiful, interactive live charts to your blog!
    1111
    1212== Description ==
    1313
    14 IPU-Chart is an easy to use shortcode that creates SVG based bar, pie, donut, line, scatter, bubble and world map charts out of your csv (comma separated), tsv (tab separated) or json data.
    15 
    16 The plugin allows you to load the data to display as a chart from a remote service that delivers json, csv or tsv formatted data. You can also export you data from favorite spreadsheet application (Excel, Numbers, Open Office) and display it as a chart in your blog or page.
    17 
    18 To create complex chart definitions and preview the immedialely use the free [IPU-Chart Editor Online](https://www.ipublia.com/support/ipu-chart-editor-online/) service.
    19 
    20 IPU-Chart is based on [SVG](http://www.w3.org/TR/SVG/) and [D3](http://d3js.org/). It works perfectly on large computer screens as well as on tablets and smaller mobile screens. For browsers that do not support SVG an alternative image can be set.
    21 
    22 With [IPU-Chart Multi Series](https://www.ipublia.com/products) we add support for interactive multi series chart types.
     14IPU-Chart is a Wordpress shortcode to create many different chart types inside your blog or page. It is based on the <strong>ip4</strong> template engine and works perfectly on large computer screens as well as on tablets and smaller mobile screens. The data to display can reside directly in the document or it can be fetched from a remote service. With version 0.8 a data update interval can be defined.
     15
     16IPU-Chart has many options to style a chart. Add your own color palette or use the functions to generate color palettes that come with the plugin.
    2317
    2418= Features =
    2519
    26 * Create bar, pie, donut, line, scatter, bubble and world map charts
    27 * Enter the json, csv or tsv data directy in you blog or page
    28 * Load the json, csv or tsv data from a remote location
    29 * [IPU-Chart Editor Online](https://www.ipublia.com/support/ipu-chart-editor-online/) to easily define the shortcodes.
    30 * Style the charts with css
    31 * Animated multi-series bubble charts
    32 * Animated world map and bar charts
    33 * Multi series extension
     20* Creates bar, pie, donut, line, scatter, bubble and world map charts
     21* Supports data in json, csv or tsv format
     22* Lets you enter the data directy in a blog or page
     23* Loads the data from a remote service
     24* Updates the data automatically if desired
     25* Has many options to style a chart with css or built-in color functions
     26
     27With the [IPU-Chart Multi Series Extension](https://www.ipublia.com/products/ipu-chart-multi-series-charts-for-wordpress/) IPU-Chart supports also multi series charts.
    3428
    3529= Usage =
    3630
    37 First, define your data. You can create it immediately in WordPress, use our [IPU-Chart Editor Online](https://www.ipublia.com/support/ipu-chart-editor-online/) service or copy and paste it from an export of your favourite spreadsheet application. Example:
    38 
    39 <pre>
    40 [csv id='data']Country,Population
    41 China,1343.24
    42 India,1205.07
    43 USA,313.85
    44 Indonesia,248.22
    45 Brazil,205.72[/csv]
    46 </pre>
    47 
    48 Second, define the chart. Reference the csv (or tsv/json). Set the chart type and the category and value column. Define the format (string, number, integer, float or date) of the category and value columns. Enter a title and a description for the chart:
    49 
    50 <pre>
    51 [chart csv='#data'
    52        type='bar'
    53        category='Country'
    54        value='Population'
    55        format='string, number'
    56        title='Top five most populous countries of the world...'
    57        description='The top five most populous countries of the world...'
    58        animate='medium']
    59 </pre>
    60 
    61 **Important:** Please enter the attributes in one line without the linefeeds (otherwise WordPress will not understand the shortcode). The linefeeds in the example are for legibility only.
    62 
    63 But the data can of course also be requested by url:
    64 
    65 <pre>
    66 [chart tsv='https://www.ipublia.com/downloads/sales.txt'
    67        type='line'
    68        category='Date'
    69        value='Sales ($)'
    70        format='dd.mm.yy, number'
    71        color='green'
    72        title='Sales of the week']
    73 </pre>
    74 
    75 This allows you to load the data from a remote data service and display it easily as a chart.
    76 
    77 Have a look at the [User Guide](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/ "IPU-Chart User Guide") of the plugin. It contains a [Quick Start](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/#quickstart "IPU-Chart Quick Start") section, [code examples](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/#usage "IPU-Chart Code Examples") for every chart type and a detailed description of the attributes and css-styles of the plugin.
    78 
    79 Please visit our [Support Forum](https://www.ipublia.com/support/forums/ "IPU-Chart Support Forum") for questions or suggestions.
    80 
    81 = Further Reading =
    82 
    83 * Our [Blogs](https://www.ipublia.com/category/wordpress/ipu-chart/ "Blogs about IPU-Chart") about IPU-Chart
    84 * The IPU-Chart for WordPress [User Guide](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/ "IPU-Chart User Guide").
    85 * The IPU-Chart [Support Forum](https://www.ipublia.com/support/forums/ "IPU-Chart Support Forum").
    86 * The IPU-Chart [Product Page](https://www.ipublia.com/products/ipu-chart-svg-chart-library/ "IPU-Chart Product Page").
    87 
    88 Enjoy!
     31To display a bar chart inside a post or page add a div element with an id (that’s where the chart will be rendered) and enter the template configuration inside the [ip4] shortcode.
     32
     33Data defined inside the document:
     34<pre><code>
     35<div id="kcal"></div>
     36...
     37
     38[ip4]{
     39    "template": ip4.barChart(),
     40    "parentElement": "#kcal",
     41    "data": {
     42        "value": [
     43           {"group": "Apple", "value": 55 },
     44           {"group": "Avocado", "value": 145 },
     45           {"group": "Banana", "value": 95 },
     46           {"group": "Grapefruit", "value": 30 },
     47           {"group": "Kiwi", "value": 55 },
     48           {"group": "Mango", "value": 65 },
     49           {"group": "Orange", "value": 45 }
     50       ]},
     51    "d3": {
     52        "yLabel": "kilo calories (kcal)"
     53    }
     54}[/ip4]
     55</code></pre>
     56
     57Data loaded from an url:
     58<pre><code>
     59<div id="kcal"></div>
     60...
     61
     62[ip4]{
     63    "template": ip4.barChart(),
     64    "parentElement": "#kcal",
     65    "data": { "uri": "http://example.org/kcal" },
     66     "d3": {
     67        "yLabel": "kilo calories (kcal)"
     68    }
     69}[/ip4]
     70</code></pre>
     71
     72= Further Information =
     73
     741. The [ip4 User Guide](https://www.ipublia.com/support/docs/ip4-user-guide/) for detailed descriptions and examples.
     751. The [IPU-Chart User Guide](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/) for the legacy interface.
     761. The [Support Forum](https://www.ipublia.com/support/forums/forum/ipu-chart-for-wordpress-basic/).
    8977
    9078== Installation ==
     
    9583== Frequently Asked Questions ==
    9684
    97 For questions or issues with IPU-Chart please use this support channels:
    98 
    99 1. [Documentation](https://www.ipublia.com/ipu-chart/)
    100 1. [FAQ](https://www.ipublia.com/support/faq/)
    101 1. [Support Forum](https://www.ipublia.com/support/forums/)
     85For questions or issues with IPU-Chart please use these support channels:
     86
     871. [ip4 User Guide](https://www.ipublia.com/support/docs/ip4-user-guide/)
     881. [IPU-Chart User Guide](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/)
     891. [Support Forum](https://www.ipublia.com/support/forums/forum/ipu-chart-for-wordpress-basic/)
    10290
    10391== Screenshots ==
     
    117105== Changelog ==
    118106
    119 = 0.1 =
    120 * Initial version with horizontal bar charts
     107= 0.8 =
     108* ip4 template engine
     109* json configuration for bar charts
     110* automatic data updates via definable update interval
     111* color palettes and color functions
     112
     113= 0.7.3 =
     114* Fixed tooltips in Google Chrome.
     115* Fixed license activation problems with multi series extension.
     116* Tested with WordPress 3.6
     117
     118= 0.7.2 =
     119* Minor bug fixes and name changes.
     120
     121= 0.7.1 =
     122* Support for negative values in horizontal bar charts added.
     123* Second shortcode set with prefix 'ipu-' added.
     124* Support for multi-series extension added.
     125
     126= 0.7 =
     127* Support for json added.
     128* Support for data adapters added.
     129* Minor layout changes (tooltip).
     130
     131= 0.6.2 =
     132* Better calculation of left margin for bar, scatter and line charts
     133* Update for bubble charts with 0 values in the data series
     134* Sor for bubble charts
     135
     136= 0.6.1 =
     137* Minor update for interoperability with the editor.
     138
     139= 0.6 =
     140* Bubble charts added
     141
     142= 0.5.1 =
     143* Patch for number formats
     144
     145= 0.5 =
     146* World Map chart type (map.world.countries) added
     147* number (n) as format added
     148* Improvements in formatting numbers
     149
     150= 0.4.1 =
     151* Support for tab separated (tsv) data added
     152* [tsv] shortcode added
     153
     154= 0.4 =
     155* Scatter charts added
     156* Shortcodes inside [csv][/csv] are processed now
     157* Minor bug fixes
     158
     159= 0.3.3 =
     160* Bug fixes documentation
     161
     162= 0.3.1 =
     163* Labels for x- and y-axis added
     164* Some bugs fixes
     165
     166= 0.3 =
     167* Donut charts added
     168* Attribute 'interpolate' added
     169* Attribute 'animate' added
     170* Enhanced error handling when loading csv data
    121171
    122172= 0.2 =
     
    129179* Changes in format definitions
    130180
    131 = 0.3 =
    132 * Donut charts added
    133 * Attribute 'interpolate' added
    134 * Attribute 'animate' added
    135 * Enhanced error handling when loading csv data
    136 
    137 = 0.3.1 =
    138 * Labels for x- and y-axis added
    139 * Some bugs fixes
    140 
    141 = 0.3.3 =
    142 * Bug fixes documentation
    143 
    144 = 0.4 =
    145 * Scatter charts added
    146 * Shortcodes inside [csv][/csv] are processed now
    147 * Minor bug fixes
    148 
    149 = 0.4.1 =
    150 * Support for tab separated (tsv) data added
    151 * [tsv] shortcode added
     181= 0.1 =
     182* Initial version with horizontal bar charts
     183
     184== Upgrade Notice ==
     185
     186= 0.8 =
     187* ip4 template engine added
     188* json configuration for bar charts
     189
     190= 0.7.3 =
     191* Fixed tooltips in Google Chrome.
     192* Fixed license activation problems with multi series extension.
     193* Tested with WordPress 3.6
     194
     195= 0.7.2 =
     196* Minor bug fixes and name changes.
     197
     198= 0.7.1 =
     199This version adds support for negative values for horizontal bar charts. A second shortcode set with the prefix 'ipu-' was added for interoperability with some plugins and themes.
     200
     201= 0.7 =
     202* Support for json added.
     203* Support for data adapters added.
     204* Minor layout changes (tooltip).
     205
     206= 0.6.2 =
     207* Better calculation of left margin for bar, scatter and line charts
     208* Update for bubble charts with 0 values in the data series
     209* Sort for bubble charts
     210
     211= 0.6.1 =
     212* Minor update for the interoperability with the IPU-Chart Editor
     213
     214= 0.6 =
     215* Support for animated, multi-series bubble charts added
     216
     217= 0.5.1 =
     218* Patch for number formats
    152219
    153220= 0.5 =
     
    156223* Improvements in formatting numbers
    157224
    158 = 0.5.1 =
    159 * Patch for number formats
    160 
    161 = 0.6 =
    162 * Bubble charts added
    163 
    164 = 0.6.1 =
    165 * Minor update for interoperability with the editor.
    166 
    167 = 0.6.2 =
    168 * Better calculation of left margin for bar, scatter and line charts
    169 * Update for bubble charts with 0 values in the data series
    170 * Sor for bubble charts
    171 
    172 = 0.7 =
    173 * Support for json added.
    174 * Support for data adapters added.
    175 * Minor layout changes (tooltip).
    176 
    177 = 0.7.1 =
    178 * Support for negative values in horizontal bar charts added.
    179 * Second shortcode set with prefix 'ipu-' added.
    180 * Support for multi-series extension added.
    181 
    182 = 0.7.2 =
    183 * Minor bug fixes and name changes.
    184 
    185 = 0.7.3 =
    186 * Fixed tooltips in Google Chrome.
    187 * Fixed license activation problems with multi series extension.
    188 * Tested with WordPress 3.6
    189 
    190 == Upgrade Notice ==
    191 
    192 = 0.2 =
    193 This version adds support for pie and line charts. Furthermore formats for dates, integers and floats can be specified.
    194 
    195 = 0.3 =
    196 This version adds support for donut charts. Line chars can be interpolated. Bar charts can be animated (click or tap the bar charts to start the animation).
    197 
    198 = 0.3.1 =
    199 This version adds labels for x- and y-axis and some bug fixes.
    200 
    201 = 0.3.3 =
    202 This version adds bug fixes in the documentation.
     225= 0.4.1 =
     226* [tsv] shortcode added for better Excel compability (use it like the [csv] but with tab separated data)
     227* Tables can now be defined with [chart type="table" ...]. The columns to display can now be choosen with the 'category' and 'value' attributes.
     228* The [table] shortcode is still supported but deprecated.
    203229
    204230= 0.4 =
     
    207233Minor bug fixes.
    208234
    209 = 0.4.1 =
    210 * [tsv] shortcode added for better Excel compability (use it like the [csv] but with tab separated data)
    211 * Tables can now be defined with [chart type="table" ...]. The columns to display can now be choosen with the 'category' and 'value' attributes.
    212 * The [table] shortcode is still supported but deprecated.
    213 
    214 = 0.5 =
    215 * World Map chart type (map.world.countries) added
    216 * number (n) as format added
    217 * Improvements in formatting numbers
    218 
    219 = 0.5.1 =
    220 * Patch for number formats
    221 
    222 = 0.6 =
    223 * Support for animated, multi-series bubble charts added
    224 
    225 = 0.6.1 =
    226 * Minor update for the interoperability with the IPU-Chart Editor
    227 
    228 = 0.6.2 =
    229 * Better calculation of left margin for bar, scatter and line charts
    230 * Update for bubble charts with 0 values in the data series
    231 * Sort for bubble charts
    232 
    233 = 0.7 =
    234 * Support for json added.
    235 * Support for data adapters added.
    236 * Minor layout changes (tooltip).
    237 
    238 = 0.7.1 =
    239 This version adds support for negative values for horizontal bar charts. A second shortcode set with the prefix 'ipu-' was added for interoperability with some plugins and themes.
    240 
    241 = 0.7.2 =
    242 * Minor bug fixes and name changes.
    243 
    244 = 0.7.3 =
    245 * Fixed tooltips in Google Chrome.
    246 * Fixed license activation problems with multi series extension.
    247 * Tested with WordPress 3.6
     235= 0.3.3 =
     236This version adds bug fixes in the documentation.
     237
     238= 0.3.1 =
     239This version adds labels for x- and y-axis and some bug fixes.
     240
     241= 0.3 =
     242This version adds support for donut charts. Line chars can be interpolated. Bar charts can be animated (click or tap the bar charts to start the animation).
     243
     244= 0.2 =
     245This version adds support for pie and line charts. Furthermore formats for dates, integers and floats can be specified.
  • ipu-chart/trunk/css/ipu-chart.css

    r721286 r809273  
    1 figure.chart {
    2   //border: 2px solid lightgray;
    3   //padding: 20px;
     1.ipuc {
     2    font-size: 0.8em;
    43}
    54
    6 .chart figcaption {
    7   //border: 2px solid yellow;
    8   //font: 0.9em sans-serif;
    9 }
    10 
    11 figure .legend {
     5.ipuc .legend {
    126    fill: dimGray;
    137    stroke: dimGray;
     
    1610}
    1711
    18 .chart svg {
    19   //border: 2px solid red;
    20   font: 0.8em sans-serif;
     12.ipuc p.error {
     13    color: blue;
    2114}
    2215
    2316/* Map chart definitions */
    2417
    25 .ISO-3166-1 {
    26     //color: transparent;
     18.ipuc .ISO-3166-1 {
    2719    font-size: 0.8em;
    2820}
    2921
    30 .stroke {
     22.ipuc .stroke {
    3123  fill: none;
    3224  stroke: dimgray;
     
    3426}
    3527
    36 .fill {
     28.ipuc .fill {
    3729  fill: #fff;
    3830}
    3931
    40 .graticule {
     32.ipuc .graticule {
    4133  fill: none;
    4234  stroke: #777;
     
    4537}
    4638
    47 .boundary {
     39.ipuc .boundary {
    4840  fill: none;
    4941  stroke: #fff;
     
    5244
    5345/* Bubble chart definitions */
    54 .node {
     46.ipuc .node {
    5547
    5648}
    5749 
    58 .node .leaf {
     50.ipuc .node .leaf {
    5951}
    6052
    6153/* Pie chart definitions */
    62 .arc path {
     54.ipuc .arc path {
    6355  stroke: white;
    6456}
     
    6658/* Line chart definitions */
    6759
    68 .line {
     60.ipuc .line {
    6961  fill: none;
    70   stroke: black;
     62  stroke: dimGray;
    7163  stroke-width: 1.5px;
     64  shape-rendering: crispEdges;
    7265}
    7366
    74 .dot {
     67/*
     68.ipuc .dot {
    7569    fill: dimGray;
    7670}
     71*/
    7772
    7873/* Axis definitions */
    79 
    80 .axis {
     74   
     75.ipuc .axis {
    8176    stroke: lightGray;
    8277    stroke-opacity: 0.8;
     
    8479}
    8580
    86 .x.axis {
     81.ipuc .x.axis {
     82
    8783}
    8884   
    89 .x.axis path {
     85.ipuc .x.axis path {
    9086    fill: none;
    9187    stroke-opacity: 0.2;
    9288}
    9389   
    94 .x.axis * line {
    95 //stroke-dasharray: 9,5;
    96 }
    97    
    98 .x.axis * text {
     90.ipuc .x.axis * text {
    9991    stroke: dimGray;
    10092    stroke-width: 0.1;
     
    10294}
    10395
    104 .x.label {
     96.ipuc .x.label {
    10597    fill: dimGray;
    10698    stroke: dimGray;
     
    109101}
    110102
    111 .y.axis {
     103.ipuc .y.axis {
    112104}
    113105   
    114 .y.axis path {
     106.ipuc .y.axis path {
    115107    fill: none;
    116108    stroke-opacity: 0.2;
    117109}
    118      
    119 .y.axis * line {
    120     //stroke-dasharray: 9,5;
    121 }
    122110
    123 .y.axis * text {
     111.ipuc .y.axis * text {
    124112    stroke: dimGray;
    125113    stroke-width: 0.1;
     
    127115}
    128116
    129 .y.label {
     117.ipuc .y.label {
    130118    fill: dimGray;
    131119    stroke: dimGray;
     
    137125
    138126div.iputooltip {
    139     font: 0.75em sans-serif;
    140     line-height: 1.0;
     127    font: 0.8em sans-serif;
     128    line-height: 1.2;
    141129    color: Black;
    142130    position: absolute;
    143     padding: 5px 10px 5px 10px;
    144     background: GhostWhite; //#faf8ba; #ffffcc;
     131    padding: 4px 4px 4px 4px;
     132    background: #FCFCFC;
    145133    border-radius: 2px;
    146     //border: 1px solid lightgray;
    147     //box-shadow: 10px 10px 5px lightgray;
    148134}
    149135
     
    152138    width: 40%;
    153139    margin-right: 10px;
    154     //font-weight: bold;
    155140}
     141
     142
     143
     144
     145
     146
  • ipu-chart/trunk/ipu-chart.php

    r767897 r809273  
    55    Description: D3/SVG based charts out of your csv, tsv or json data. Currently supports bar, pie, donut, line, scatter, bubble and world map charts.
    66    Author: Thomas Müller Flury, ipublia
    7     Version: 0.7.3
     7    Version: 0.8
    88    Author URI: https://www.ipublia.com/author/thmufl/
    9     Text Domain: ipuchart
     9    Text Domain: ipuc
    1010    Domain Path: /lang
    1111 */
     
    3232        $content = str_replace("<br />", "\r", $content);
    3333    }
     34    $content = str_replace(array("&#8216;", "&#8220;", "&#8221;", "&#8242;", "&#8243;"), "\"", $content);
    3435    $content = trim($content);
    3536    return ipuc_render_csv($id, do_shortcode($content));
     
    4546        $content = str_replace("<br />", "\r", $content);
    4647    }
     48    $content = str_replace(array("&#8216;", "&#8220;", "&#8221;", "&#8242;", "&#8243;"), "\"", $content);
    4749    $content = trim($content);
    4850    return ipuc_render_tsv($id, do_shortcode($content));
     
    5860        $content = str_replace("<br />", "\r", $content);
    5961    }
     62    $content = str_replace(array("&#8216;", "&#8220;", "&#8221;", "&#8242;", "&#8243;"), "\"", $content);
    6063    $content = trim($content);
    6164    return ipuc_render_json($id, do_shortcode($content));
    6265}
    6366
    64 // This is the chart tag
     67// This is the chart tag. Will be replaced by the chart-def tag.
    6568function ipuc_chart_func($atts) {
    6669    extract(shortcode_atts(array(
     
    9194}
    9295
     96// The ip4 tag
     97function ip4_func($atts, $content = null) {
     98    extract(shortcode_atts(array(
     99        'log' => 'ip4.log.level.warn'
     100    ), $atts));
     101   
     102    if(has_filter('the_content', 'wpautop')) {
     103        $content = str_replace("<br />", "", $content);
     104    }
     105    $content = trim($content);
     106    return ip4_render($log, do_shortcode($content));
     107}
     108
    93109// This is the table tag (deprecated)
    94110function ipuc_table_func($atts) {
     
    105121add_shortcode("csv", "ipuc_csv_func");
    106122add_shortcode("tsv", "ipuc_tsv_func");
    107 add_shortcode("json", "ipuc_tsv_func");
     123add_shortcode("json", "ipuc_json_func");
    108124add_shortcode("chart", "ipuc_chart_func");
    109125add_shortcode("table", "ipuc_table_func");
     126
    110127
    111128// Second shortcode set for compability with some themes.
    112129add_shortcode("ipu-csv", "ipuc_csv_func");
    113130add_shortcode("ipu-tsv", "ipuc_tsv_func");
    114 add_shortcode("ipu-json", "ipuc_tsv_func");
     131add_shortcode("ipu-json", "ipuc_json_func");
    115132add_shortcode("ipu-chart", "ipuc_chart_func");
    116133add_shortcode("ipu-table", "ipuc_table_func");
     134
     135// ip4 shortcode since version 0.8
     136add_shortcode("ip4", "ip4_func");
    117137
    118138function ipuc_render_csv($id, $content) {
     
    139159                </table>";
    140160    } else {   
    141         return "<figure id='{$id}' class='chart'>
     161        return "<figure id='{$id}' class='ipuc'>
    142162                    <script type='text/javascript'>
    143163                    renderChart(\"{$id}\", \"{$csv}\", \"{$tsv}\", \"{$json}\", \"{$type}\", \"{$category}\", \"{$value}\",
     
    150170}
    151171
     172function ip4_render($log, $content) {
     173
     174    $content = str_replace(array("&#8220;", "&#8221;", "&#8222;", "&#8242;", "&#8243;"), "\"", $content);
     175    $content = str_replace(array("&#8216;", "&#8217;"), "'", $content);
     176    $content = str_replace("&#8211;", "-", $content);
     177    $content = str_replace("\n", "", $content);
     178    $content = preg_replace('/\s+/', ' ', $content);
     179       
     180    return "<script type='text/javascript' encoding='utf-8'>
     181                ip4.draw({$content});
     182            </script>";
     183}
     184
    152185function ipuc_render_table($id, $csv, $title, $debug) {
    153186    return "<table id='{$id}' class='chart-data'>
     
    160193// Add plug-in's scripts to the header of the pages
    161194function ipuc_add_custom_scripts() {   
    162     wp_register_script('custom-script-d3', plugins_url( '/js/d3/d3.v3.min.js', __FILE__ ));
     195    //wp_register_script('custom-script-d3', plugins_url( '/js/d3/d3.v3.min.js', __FILE__ ));
     196    wp_register_script('custom-script-ip4-v0', plugins_url( '/js/ip4.v0.min.js', __FILE__ ));
     197    wp_register_script('custom-script-ipuc', plugins_url( '/js/ipu-chart.js', __FILE__ ));
    163198    wp_register_script('custom-script-queue', plugins_url( '/js/d3/queue.v1.min.js', __FILE__ ));
    164199    wp_register_script('custom-script-d3-geo-projection', plugins_url( '/js/d3/d3.geo.projection.v0.min.js', __FILE__ ));
    165200    wp_register_script('custom-script-topojson', plugins_url( '/js/d3/topojson.v0.min.js', __FILE__ ));
    166     wp_register_script('custom-script-ipuc', plugins_url( '/js/ipu-chart.js', __FILE__ )); 
     201    wp_register_script('custom-script-colorbrewer', plugins_url( '/js/colorbrewer/colorbrewer.js', __FILE__ ));
    167202 
    168     wp_enqueue_script('custom-script-d3');
     203    //wp_enqueue_script('custom-script-d3');
     204    wp_enqueue_script('custom-script-ip4-v0');
     205    wp_enqueue_script('custom-script-ipuc');
    169206    wp_enqueue_script('custom-script-queue');
    170207    wp_enqueue_script('custom-script-d3-geo-projection');
    171208    wp_enqueue_script('custom-script-topojson');
    172     wp_enqueue_script('custom-script-ipuc'); 
     209    wp_enqueue_script('custom-script-colorbrewer'); 
    173210}
    174211add_action('wp_enqueue_scripts', 'ipuc_add_custom_scripts' );
     
    176213// Add plug-in's stylesheets to the header of the pages
    177214function ipuc_add_custom_styles() { 
    178     wp_register_style('custom-style', plugins_url( '/css/ipu-chart.css', __FILE__ ), array(), '0.9', 'all' );   
    179     wp_enqueue_style('custom-style'); 
     215    wp_register_style('custom-style-ipuc', plugins_url( '/css/ipu-chart.css', __FILE__ ), array(), '0.7', 'all' );   
     216    wp_register_style('custom-style-ip4-v0', plugins_url( '/css/ip4.v0.css', __FILE__ ), array(), '0.8', 'all' );
     217    wp_enqueue_style('custom-style-ipuc'); 
     218    wp_enqueue_style('custom-style-ip4-v0');
    180219
    181220add_action('wp_enqueue_scripts', 'ipuc_add_custom_styles' );
    182221
    183 // Add settings page (licenses etc.)
    184 function ipuc_settings_menu() {
    185     add_menu_page('IPU-Chart Plugin Settings', 'IPU-Chart', 'administrator', __FILE__, 'ipuc_settings_page', plugins_url('img/ipuc-icon-16x16-bw.png', __FILE__));
    186 }
    187 add_action('admin_menu', 'ipuc_settings_menu');
    188 
    189 require_once IPUC_PLUGIN_DIR . 'include/settings.php';
    190 
    191222?>
  • ipu-chart/trunk/js/ipu-chart.js

    r767897 r809273  
    569569                .attr("r", function(d) { return d.r; });               
    570570    }
    571        
     571
    572572    if(touch_device) {
    573573        d3.selectAll(".leaf circle")
     
    11871187   
    11881188function showTooltip(d) {
     1189   
    11891190    d3.selectAll(".bar").transition()
    11901191        .duration(100)
  • ipu-chart/trunk/license.php

    r721286 r809273  
    11<?php
    2 /*  Copyright 2013  Thomas Müller Flury, ipublia  (email : thmufl@gmail.com)
     2/*
     3    ip3 - Templates for d3 and more.
    34
    4     This program is free software; you can redistribute it and/or modify
    5     it under the terms of the GNU General Public License, version 2, as
    6     published by the Free Software Foundation.
     5    Copyright (C) 2013  Thomas Müller Flury <thmf@ipublia.com>
    76
    8     This program is distributed in the hope that it will be useful,
    9     but WITHOUT ANY WARRANTY; without even the implied warranty of
    10     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    11     GNU General Public License for more details.
     7    This program is free software: you can redistribute it and/or modify
     8    it under the terms of the GNU General Public License as published by
     9    the Free Software Foundation, either version 3 of the License, or
     10    (at your option) any later version.
    1211
    13     You should have received a copy of the GNU General Public License
    14     along with this program; if not, write to the Free Software
    15     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     12    This program is distributed in the hope that it will be useful,
     13    but WITHOUT ANY WARRANTY; without even the implied warranty of
     14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15    GNU General Public License for more details.
     16
     17    You should have received a copy of the GNU General Public License
     18    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1619*/
    1720?>
  • ipu-chart/trunk/readme.txt

    r767897 r809273  
    33Tags: chart, chart editor, bar chart, pie chart, line chart, donut chart, scatter chart, bubble chart, world map, map, countries, animation, quotes, diagram, csv, tsv, json, excel, numbers, svg, d3, d3js
    44Requires at least: 3.0.1
    5 Tested up to: 3.6
    6 Stable tag: 0.7.3
     5Tested up to: 3.7.1
     6Stable tag: 0.8
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 Create D3/SVG based charts out of a remote data service or spreadsheet data (csv, tsv or json).
     10Add beautiful, interactive live charts to your blog!
    1111
    1212== Description ==
    1313
    14 IPU-Chart is an easy to use shortcode that creates SVG based bar, pie, donut, line, scatter, bubble and world map charts out of your csv (comma separated), tsv (tab separated) or json data.
    15 
    16 The plugin allows you to load the data to display as a chart from a remote service that delivers json, csv or tsv formatted data. You can also export you data from favorite spreadsheet application (Excel, Numbers, Open Office) and display it as a chart in your blog or page.
    17 
    18 To create complex chart definitions and preview the immedialely use the free [IPU-Chart Editor Online](https://www.ipublia.com/support/ipu-chart-editor-online/) service.
    19 
    20 IPU-Chart is based on [SVG](http://www.w3.org/TR/SVG/) and [D3](http://d3js.org/). It works perfectly on large computer screens as well as on tablets and smaller mobile screens. For browsers that do not support SVG an alternative image can be set.
    21 
    22 With [IPU-Chart Multi Series](https://www.ipublia.com/products) we add support for interactive multi series chart types.
     14IPU-Chart is a Wordpress shortcode to create many different chart types inside your blog or page. It is based on the <strong>ip4</strong> template engine and works perfectly on large computer screens as well as on tablets and smaller mobile screens. The data to display can reside directly in the document or it can be fetched from a remote service. With version 0.8 a data update interval can be defined.
     15
     16IPU-Chart has many options to style a chart. Add your own color palette or use the functions to generate color palettes that come with the plugin.
    2317
    2418= Features =
    2519
    26 * Create bar, pie, donut, line, scatter, bubble and world map charts
    27 * Enter the json, csv or tsv data directy in you blog or page
    28 * Load the json, csv or tsv data from a remote location
    29 * [IPU-Chart Editor Online](https://www.ipublia.com/support/ipu-chart-editor-online/) to easily define the shortcodes.
    30 * Style the charts with css
    31 * Animated multi-series bubble charts
    32 * Animated world map and bar charts
    33 * Multi series extension
     20* Creates bar, pie, donut, line, scatter, bubble and world map charts
     21* Supports data in json, csv or tsv format
     22* Lets you enter the data directy in a blog or page
     23* Loads the data from a remote service
     24* Updates the data automatically if desired
     25* Has many options to style a chart with css or built-in color functions
     26
     27With the [IPU-Chart Multi Series Extension](https://www.ipublia.com/products/ipu-chart-multi-series-charts-for-wordpress/) IPU-Chart supports also multi series charts.
    3428
    3529= Usage =
    3630
    37 First, define your data. You can create it immediately in WordPress, use our [IPU-Chart Editor Online](https://www.ipublia.com/support/ipu-chart-editor-online/) service or copy and paste it from an export of your favourite spreadsheet application. Example:
    38 
    39 <pre>
    40 [csv id='data']Country,Population
    41 China,1343.24
    42 India,1205.07
    43 USA,313.85
    44 Indonesia,248.22
    45 Brazil,205.72[/csv]
    46 </pre>
    47 
    48 Second, define the chart. Reference the csv (or tsv/json). Set the chart type and the category and value column. Define the format (string, number, integer, float or date) of the category and value columns. Enter a title and a description for the chart:
    49 
    50 <pre>
    51 [chart csv='#data'
    52        type='bar'
    53        category='Country'
    54        value='Population'
    55        format='string, number'
    56        title='Top five most populous countries of the world...'
    57        description='The top five most populous countries of the world...'
    58        animate='medium']
    59 </pre>
    60 
    61 **Important:** Please enter the attributes in one line without the linefeeds (otherwise WordPress will not understand the shortcode). The linefeeds in the example are for legibility only.
    62 
    63 But the data can of course also be requested by url:
    64 
    65 <pre>
    66 [chart tsv='https://www.ipublia.com/downloads/sales.txt'
    67        type='line'
    68        category='Date'
    69        value='Sales ($)'
    70        format='dd.mm.yy, number'
    71        color='green'
    72        title='Sales of the week']
    73 </pre>
    74 
    75 This allows you to load the data from a remote data service and display it easily as a chart.
    76 
    77 Have a look at the [User Guide](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/ "IPU-Chart User Guide") of the plugin. It contains a [Quick Start](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/#quickstart "IPU-Chart Quick Start") section, [code examples](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/#usage "IPU-Chart Code Examples") for every chart type and a detailed description of the attributes and css-styles of the plugin.
    78 
    79 Please visit our [Support Forum](https://www.ipublia.com/support/forums/ "IPU-Chart Support Forum") for questions or suggestions.
    80 
    81 = Further Reading =
    82 
    83 * Our [Blogs](https://www.ipublia.com/category/wordpress/ipu-chart/ "Blogs about IPU-Chart") about IPU-Chart
    84 * The IPU-Chart for WordPress [User Guide](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/ "IPU-Chart User Guide").
    85 * The IPU-Chart [Support Forum](https://www.ipublia.com/support/forums/ "IPU-Chart Support Forum").
    86 * The IPU-Chart [Product Page](https://www.ipublia.com/products/ipu-chart-svg-chart-library/ "IPU-Chart Product Page").
    87 
    88 Enjoy!
     31To display a bar chart inside a post or page add a div element with an id (that’s where the chart will be rendered) and enter the template configuration inside the [ip4] shortcode.
     32
     33Data defined inside the document:
     34<pre><code>
     35<div id="kcal"></div>
     36...
     37
     38[ip4]{
     39    "template": ip4.barChart(),
     40    "parentElement": "#kcal",
     41    "data": {
     42        "value": [
     43           {"group": "Apple", "value": 55 },
     44           {"group": "Avocado", "value": 145 },
     45           {"group": "Banana", "value": 95 },
     46           {"group": "Grapefruit", "value": 30 },
     47           {"group": "Kiwi", "value": 55 },
     48           {"group": "Mango", "value": 65 },
     49           {"group": "Orange", "value": 45 }
     50       ]},
     51    "d3": {
     52        "yLabel": "kilo calories (kcal)"
     53    }
     54}[/ip4]
     55</code></pre>
     56
     57Data loaded from an url:
     58<pre><code>
     59<div id="kcal"></div>
     60...
     61
     62[ip4]{
     63    "template": ip4.barChart(),
     64    "parentElement": "#kcal",
     65    "data": { "uri": "http://example.org/kcal" },
     66     "d3": {
     67        "yLabel": "kilo calories (kcal)"
     68    }
     69}[/ip4]
     70</code></pre>
     71
     72= Further Information =
     73
     741. The [ip4 User Guide](https://www.ipublia.com/support/docs/ip4-user-guide/) for detailed descriptions and examples.
     751. The [IPU-Chart User Guide](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/) for the legacy interface.
     761. The [Support Forum](https://www.ipublia.com/support/forums/forum/ipu-chart-for-wordpress-basic/).
    8977
    9078== Installation ==
     
    9583== Frequently Asked Questions ==
    9684
    97 For questions or issues with IPU-Chart please use this support channels:
    98 
    99 1. [Documentation](https://www.ipublia.com/ipu-chart/)
    100 1. [FAQ](https://www.ipublia.com/support/faq/)
    101 1. [Support Forum](https://www.ipublia.com/support/forums/)
     85For questions or issues with IPU-Chart please use these support channels:
     86
     871. [ip4 User Guide](https://www.ipublia.com/support/docs/ip4-user-guide/)
     881. [IPU-Chart User Guide](https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/)
     891. [Support Forum](https://www.ipublia.com/support/forums/forum/ipu-chart-for-wordpress-basic/)
    10290
    10391== Screenshots ==
     
    117105== Changelog ==
    118106
    119 = 0.1 =
    120 * Initial version with horizontal bar charts
     107= 0.8 =
     108* ip4 template engine
     109* json configuration for bar charts
     110* automatic data updates via definable update interval
     111* color palettes and color functions
     112
     113= 0.7.3 =
     114* Fixed tooltips in Google Chrome.
     115* Fixed license activation problems with multi series extension.
     116* Tested with WordPress 3.6
     117
     118= 0.7.2 =
     119* Minor bug fixes and name changes.
     120
     121= 0.7.1 =
     122* Support for negative values in horizontal bar charts added.
     123* Second shortcode set with prefix 'ipu-' added.
     124* Support for multi-series extension added.
     125
     126= 0.7 =
     127* Support for json added.
     128* Support for data adapters added.
     129* Minor layout changes (tooltip).
     130
     131= 0.6.2 =
     132* Better calculation of left margin for bar, scatter and line charts
     133* Update for bubble charts with 0 values in the data series
     134* Sor for bubble charts
     135
     136= 0.6.1 =
     137* Minor update for interoperability with the editor.
     138
     139= 0.6 =
     140* Bubble charts added
     141
     142= 0.5.1 =
     143* Patch for number formats
     144
     145= 0.5 =
     146* World Map chart type (map.world.countries) added
     147* number (n) as format added
     148* Improvements in formatting numbers
     149
     150= 0.4.1 =
     151* Support for tab separated (tsv) data added
     152* [tsv] shortcode added
     153
     154= 0.4 =
     155* Scatter charts added
     156* Shortcodes inside [csv][/csv] are processed now
     157* Minor bug fixes
     158
     159= 0.3.3 =
     160* Bug fixes documentation
     161
     162= 0.3.1 =
     163* Labels for x- and y-axis added
     164* Some bugs fixes
     165
     166= 0.3 =
     167* Donut charts added
     168* Attribute 'interpolate' added
     169* Attribute 'animate' added
     170* Enhanced error handling when loading csv data
    121171
    122172= 0.2 =
     
    129179* Changes in format definitions
    130180
    131 = 0.3 =
    132 * Donut charts added
    133 * Attribute 'interpolate' added
    134 * Attribute 'animate' added
    135 * Enhanced error handling when loading csv data
    136 
    137 = 0.3.1 =
    138 * Labels for x- and y-axis added
    139 * Some bugs fixes
    140 
    141 = 0.3.3 =
    142 * Bug fixes documentation
    143 
    144 = 0.4 =
    145 * Scatter charts added
    146 * Shortcodes inside [csv][/csv] are processed now
    147 * Minor bug fixes
    148 
    149 = 0.4.1 =
    150 * Support for tab separated (tsv) data added
    151 * [tsv] shortcode added
     181= 0.1 =
     182* Initial version with horizontal bar charts
     183
     184== Upgrade Notice ==
     185
     186= 0.8 =
     187* ip4 template engine added
     188* json configuration for bar charts
     189
     190= 0.7.3 =
     191* Fixed tooltips in Google Chrome.
     192* Fixed license activation problems with multi series extension.
     193* Tested with WordPress 3.6
     194
     195= 0.7.2 =
     196* Minor bug fixes and name changes.
     197
     198= 0.7.1 =
     199This version adds support for negative values for horizontal bar charts. A second shortcode set with the prefix 'ipu-' was added for interoperability with some plugins and themes.
     200
     201= 0.7 =
     202* Support for json added.
     203* Support for data adapters added.
     204* Minor layout changes (tooltip).
     205
     206= 0.6.2 =
     207* Better calculation of left margin for bar, scatter and line charts
     208* Update for bubble charts with 0 values in the data series
     209* Sort for bubble charts
     210
     211= 0.6.1 =
     212* Minor update for the interoperability with the IPU-Chart Editor
     213
     214= 0.6 =
     215* Support for animated, multi-series bubble charts added
     216
     217= 0.5.1 =
     218* Patch for number formats
    152219
    153220= 0.5 =
     
    156223* Improvements in formatting numbers
    157224
    158 = 0.5.1 =
    159 * Patch for number formats
    160 
    161 = 0.6 =
    162 * Bubble charts added
    163 
    164 = 0.6.1 =
    165 * Minor update for interoperability with the editor.
    166 
    167 = 0.6.2 =
    168 * Better calculation of left margin for bar, scatter and line charts
    169 * Update for bubble charts with 0 values in the data series
    170 * Sor for bubble charts
    171 
    172 = 0.7 =
    173 * Support for json added.
    174 * Support for data adapters added.
    175 * Minor layout changes (tooltip).
    176 
    177 = 0.7.1 =
    178 * Support for negative values in horizontal bar charts added.
    179 * Second shortcode set with prefix 'ipu-' added.
    180 * Support for multi-series extension added.
    181 
    182 = 0.7.2 =
    183 * Minor bug fixes and name changes.
    184 
    185 = 0.7.3 =
    186 * Fixed tooltips in Google Chrome.
    187 * Fixed license activation problems with multi series extension.
    188 * Tested with WordPress 3.6
    189 
    190 == Upgrade Notice ==
    191 
    192 = 0.2 =
    193 This version adds support for pie and line charts. Furthermore formats for dates, integers and floats can be specified.
    194 
    195 = 0.3 =
    196 This version adds support for donut charts. Line chars can be interpolated. Bar charts can be animated (click or tap the bar charts to start the animation).
    197 
    198 = 0.3.1 =
    199 This version adds labels for x- and y-axis and some bug fixes.
    200 
    201 = 0.3.3 =
    202 This version adds bug fixes in the documentation.
     225= 0.4.1 =
     226* [tsv] shortcode added for better Excel compability (use it like the [csv] but with tab separated data)
     227* Tables can now be defined with [chart type="table" ...]. The columns to display can now be choosen with the 'category' and 'value' attributes.
     228* The [table] shortcode is still supported but deprecated.
    203229
    204230= 0.4 =
     
    207233Minor bug fixes.
    208234
    209 = 0.4.1 =
    210 * [tsv] shortcode added for better Excel compability (use it like the [csv] but with tab separated data)
    211 * Tables can now be defined with [chart type="table" ...]. The columns to display can now be choosen with the 'category' and 'value' attributes.
    212 * The [table] shortcode is still supported but deprecated.
    213 
    214 = 0.5 =
    215 * World Map chart type (map.world.countries) added
    216 * number (n) as format added
    217 * Improvements in formatting numbers
    218 
    219 = 0.5.1 =
    220 * Patch for number formats
    221 
    222 = 0.6 =
    223 * Support for animated, multi-series bubble charts added
    224 
    225 = 0.6.1 =
    226 * Minor update for the interoperability with the IPU-Chart Editor
    227 
    228 = 0.6.2 =
    229 * Better calculation of left margin for bar, scatter and line charts
    230 * Update for bubble charts with 0 values in the data series
    231 * Sort for bubble charts
    232 
    233 = 0.7 =
    234 * Support for json added.
    235 * Support for data adapters added.
    236 * Minor layout changes (tooltip).
    237 
    238 = 0.7.1 =
    239 This version adds support for negative values for horizontal bar charts. A second shortcode set with the prefix 'ipu-' was added for interoperability with some plugins and themes.
    240 
    241 = 0.7.2 =
    242 * Minor bug fixes and name changes.
    243 
    244 = 0.7.3 =
    245 * Fixed tooltips in Google Chrome.
    246 * Fixed license activation problems with multi series extension.
    247 * Tested with WordPress 3.6
     235= 0.3.3 =
     236This version adds bug fixes in the documentation.
     237
     238= 0.3.1 =
     239This version adds labels for x- and y-axis and some bug fixes.
     240
     241= 0.3 =
     242This version adds support for donut charts. Line chars can be interpolated. Bar charts can be animated (click or tap the bar charts to start the animation).
     243
     244= 0.2 =
     245This version adds support for pie and line charts. Furthermore formats for dates, integers and floats can be specified.
Note: See TracChangeset for help on using the changeset viewer.