Plugin Directory

Changeset 714394


Ignore:
Timestamp:
05/17/2013 02:00:05 PM (13 years ago)
Author:
thmufl
Message:

Interoperability update for the editor

Location:
ipu-chart
Files:
1 added
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ipu-chart/tags/0.6.1/ipu-chart.php

    r711361 r714394  
    22/*
    33    Plugin Name: IPU-Chart
    4     Plugin URI: https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/
    5     Description: Creates D3/SVG based charts out of your comma- or tab-separated data. Currently supports bar, pie, donut, line, scatter, bubble and world map charts.
    6     Author: ipublia, Thomas Müller Flury
    7     Version: 0.6
     4    Plugin URI: https://www.ipublia.com/support/ipu-chart-editor-online/
     5    Description: Creates D3/SVG based charts out of your comma- or tab-separated data. Currently supports bar, pie, donut, line, scatter, bubble and world map charts. 
     6    Author: Thomas Müller Flury, ipublia
     7    Version: 0.6.1
    88    Author URI: https://www.ipublia.com/author/thmufl/
    99    Text Domain: ipuchart
     
    2222function ipu_csv_func($atts, $content = null) {
    2323    extract(shortcode_atts(array(
    24         'id' => 'csv' . rand(0, 999999),
     24        'id' => 'd' . rand(0, 999999),
    2525    ), $atts));
    2626   
     
    3535function ipu_tsv_func($atts, $content = null) {
    3636    extract(shortcode_atts(array(
    37         'id' => 'tsv' . rand(0, 999999),
     37        'id' => 'd' . rand(0, 999999),
    3838    ), $atts));
    3939   
     
    4848function ipu_chart_func($atts) {
    4949    extract(shortcode_atts(array(
    50         'id' => 'chart' . rand(0, 999999),
     50        'id' => 'c' . rand(0, 999999),
    5151        'csv' => '',
    5252        'tsv' => '',
  • ipu-chart/tags/0.6.1/js/ipu-chart.js

    r711361 r714394  
    115115}
    116116
    117 function createFigureElement(id, title, description, style, version) {
    118     var figure = d3.select('#' + id);   
     117function createFigureElement(id, title, description, style, version, debug) {
     118
     119    if(debug) console.log("start createFigureElement(id=" + id + ")");
     120   
     121    var figure = d3.select('#' + id);
     122   
     123    if(debug) { console.log("createFigureElement: selected figure is:"); console.log(figure); }
     124   
    119125    figure.attr("style", style);
    120126
    121127    var svg = figure.append("svg");
    122    
    123128    var meta = svg.append("g")
    124129        .attr("class", "meta");
     
    128133    meta.append("a")
    129134        .attr("href", "https://www.ipublia.com/products/ipu-chart-svg-chart-library/")
    130         .text(version + " (IPU448032107)");
     135        .text(version + " (IPUC418032107)");
    131136       
    132137    figure.append("figcaption").text(title);   
     
    198203        figure.append("caption").text(title);
    199204    } else {
    200         figure = createFigureElement(id, title, description, style, version);
     205        figure = createFigureElement(id, title, description, style, version, debug);
    201206        if(!svgSupport) return renderNoSvgSupport(figure, img);
    202207        createTooltip();
     
    208213    color = toArray(color);
    209214    animate = toArray(animate);
    210        
     215   
    211216    if(animate[0] == "slow") animate = ["5000", "linear"];
    212217    else if(animate[0] == "medium") animate = ["2000", "linear"];
     
    264269   
    265270    if(type.toLowerCase().trim() == "bar")
    266         renderBar(figure, data, category, value, format, color, sort, interpolate, animate, debug);
     271        renderBar(figure, data, category[0], value[0], format, color, sort, interpolate, animate, debug);
    267272       
    268273    else if(type.toLowerCase().trim() == "bar.horizontal")
    269         renderBarHorizontal(figure, data, category, value, format, color, sort, interpolate, animate, debug);
     274        renderBarHorizontal(figure, data, category[0], value[0], format, color, sort, interpolate, animate, debug);
    270275             
    271276    else if(type.toLowerCase().trim() == "pie")
    272         renderPie(figure, data, category, value, format, color, sort, interpolate, animate, debug);
     277        renderPie(figure, data, category[0], value[0], format, color, sort, interpolate, animate, debug);
    273278       
    274279    else if(type.toLowerCase().trim() == "donut")
    275         renderDonut(figure, data, category, value, format, color, sort, interpolate, animate, debug);
     280        renderDonut(figure, data, category[0], value[0], format, color, sort, interpolate, animate, debug);
    276281       
    277282    else if(type.toLowerCase().trim() == "line")
  • ipu-chart/tags/0.6.1/readme.txt

    r711361 r714394  
    11=== Plugin Name ===
    22Contributors: thmufl
    3 Tags: chart, bar chart, pie chart, line chart, donut chart, scatter chart, bubble chart, world map, map, countries, animation, quotes, diagram, csv, tsv, excel, numbers, svg, d3, d3js
     3Tags: chart, chart editor, bar chart, pie chart, line chart, donut chart, scatter chart, bubble chart, world map, map, countries, animation, quotes, diagram, csv, tsv, excel, numbers, svg, d3, d3js
    44Requires at least: 3.0.1
    55Tested up to: 3.5.1
    6 Stable tag: 0.6
     6Stable tag: 0.6.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 Creates SVG based, animated bar, pie, donut, line, scatter, bubble and world map charts out of your spreadsheet data. A powerful, easy to use shortcode.
     10Creates SVG based, animated bar, pie, donut, line, scatter, bubble and world map charts out of your spreadsheet data. A powerful, easy to use shortcode. And even easier with the free [IPU-Chart Editor Online](https://www.ipublia.com/support/ipu-chart-editor-online/)!
    1111
    1212== Description ==
     
    1515
    1616The plugin allows you to load the data to display as a chart from a remote service that delivers 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
     18To 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.
    1719
    1820IPU-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.
     
    2527* Enter the csv/tsv data directy in you blog or page
    2628* Load the csv/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.
    2730* Create multiple views of the data
    2831* Style the charts with css
     
    3538= Usage =
    3639
    37 *Read our blog [Create a World Map in WordPress](https://www.ipublia.com/create-a-world-map-in-wordpress/ "Create a World Map in WordPress") for a short introduction of the new world map chart.*
    38 
    39 First, define your data. You can create it immediately in WordPress or copy and paste it from an export of your favourite spreadsheet application. Example:
     40First, 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:
    4041
    4142<pre>
     
    1151169. World map chart
    11611710. Bubble chart
     11811. IPU-Chart Editor
    117119
    118120== Changelog ==
     
    163165* Bubble charts added
    164166
     167= 0.6.1 =
     168* Minor update for interoperability with the editor.
     169
    165170== Upgrade Notice ==
    166171
     
    198203* Support for animated, multi-series bubble charts added
    199204
    200 
     205= 0.6.1 =
     206* Minor update for the interoperability with the IPU-Chart Editor
     207
     208
  • ipu-chart/trunk/ipu-chart.php

    r711361 r714394  
    22/*
    33    Plugin Name: IPU-Chart
    4     Plugin URI: https://www.ipublia.com/support/docs/ipu-chart-for-wordpress-user-guide/
    5     Description: Creates D3/SVG based charts out of your comma- or tab-separated data. Currently supports bar, pie, donut, line, scatter, bubble and world map charts.
    6     Author: ipublia, Thomas Müller Flury
    7     Version: 0.6
     4    Plugin URI: https://www.ipublia.com/support/ipu-chart-editor-online/
     5    Description: Creates D3/SVG based charts out of your comma- or tab-separated data. Currently supports bar, pie, donut, line, scatter, bubble and world map charts. 
     6    Author: Thomas Müller Flury, ipublia
     7    Version: 0.6.1
    88    Author URI: https://www.ipublia.com/author/thmufl/
    99    Text Domain: ipuchart
     
    2222function ipu_csv_func($atts, $content = null) {
    2323    extract(shortcode_atts(array(
    24         'id' => 'csv' . rand(0, 999999),
     24        'id' => 'd' . rand(0, 999999),
    2525    ), $atts));
    2626   
     
    3535function ipu_tsv_func($atts, $content = null) {
    3636    extract(shortcode_atts(array(
    37         'id' => 'tsv' . rand(0, 999999),
     37        'id' => 'd' . rand(0, 999999),
    3838    ), $atts));
    3939   
     
    4848function ipu_chart_func($atts) {
    4949    extract(shortcode_atts(array(
    50         'id' => 'chart' . rand(0, 999999),
     50        'id' => 'c' . rand(0, 999999),
    5151        'csv' => '',
    5252        'tsv' => '',
  • ipu-chart/trunk/js/ipu-chart.js

    r711361 r714394  
    115115}
    116116
    117 function createFigureElement(id, title, description, style, version) {
    118     var figure = d3.select('#' + id);   
     117function createFigureElement(id, title, description, style, version, debug) {
     118
     119    if(debug) console.log("start createFigureElement(id=" + id + ")");
     120   
     121    var figure = d3.select('#' + id);
     122   
     123    if(debug) { console.log("createFigureElement: selected figure is:"); console.log(figure); }
     124   
    119125    figure.attr("style", style);
    120126
    121127    var svg = figure.append("svg");
    122    
    123128    var meta = svg.append("g")
    124129        .attr("class", "meta");
     
    128133    meta.append("a")
    129134        .attr("href", "https://www.ipublia.com/products/ipu-chart-svg-chart-library/")
    130         .text(version + " (IPU448032107)");
     135        .text(version + " (IPUC418032107)");
    131136       
    132137    figure.append("figcaption").text(title);   
     
    198203        figure.append("caption").text(title);
    199204    } else {
    200         figure = createFigureElement(id, title, description, style, version);
     205        figure = createFigureElement(id, title, description, style, version, debug);
    201206        if(!svgSupport) return renderNoSvgSupport(figure, img);
    202207        createTooltip();
     
    208213    color = toArray(color);
    209214    animate = toArray(animate);
    210        
     215   
    211216    if(animate[0] == "slow") animate = ["5000", "linear"];
    212217    else if(animate[0] == "medium") animate = ["2000", "linear"];
     
    264269   
    265270    if(type.toLowerCase().trim() == "bar")
    266         renderBar(figure, data, category, value, format, color, sort, interpolate, animate, debug);
     271        renderBar(figure, data, category[0], value[0], format, color, sort, interpolate, animate, debug);
    267272       
    268273    else if(type.toLowerCase().trim() == "bar.horizontal")
    269         renderBarHorizontal(figure, data, category, value, format, color, sort, interpolate, animate, debug);
     274        renderBarHorizontal(figure, data, category[0], value[0], format, color, sort, interpolate, animate, debug);
    270275             
    271276    else if(type.toLowerCase().trim() == "pie")
    272         renderPie(figure, data, category, value, format, color, sort, interpolate, animate, debug);
     277        renderPie(figure, data, category[0], value[0], format, color, sort, interpolate, animate, debug);
    273278       
    274279    else if(type.toLowerCase().trim() == "donut")
    275         renderDonut(figure, data, category, value, format, color, sort, interpolate, animate, debug);
     280        renderDonut(figure, data, category[0], value[0], format, color, sort, interpolate, animate, debug);
    276281       
    277282    else if(type.toLowerCase().trim() == "line")
  • ipu-chart/trunk/readme.txt

    r711361 r714394  
    11=== Plugin Name ===
    22Contributors: thmufl
    3 Tags: chart, bar chart, pie chart, line chart, donut chart, scatter chart, bubble chart, world map, map, countries, animation, quotes, diagram, csv, tsv, excel, numbers, svg, d3, d3js
     3Tags: chart, chart editor, bar chart, pie chart, line chart, donut chart, scatter chart, bubble chart, world map, map, countries, animation, quotes, diagram, csv, tsv, excel, numbers, svg, d3, d3js
    44Requires at least: 3.0.1
    55Tested up to: 3.5.1
    6 Stable tag: 0.6
     6Stable tag: 0.6.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 Creates SVG based, animated bar, pie, donut, line, scatter, bubble and world map charts out of your spreadsheet data. A powerful, easy to use shortcode.
     10Creates SVG based, animated bar, pie, donut, line, scatter, bubble and world map charts out of your spreadsheet data. A powerful, easy to use shortcode. And even easier with the free [IPU-Chart Editor Online](https://www.ipublia.com/support/ipu-chart-editor-online/)!
    1111
    1212== Description ==
     
    1515
    1616The plugin allows you to load the data to display as a chart from a remote service that delivers 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
     18To 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.
    1719
    1820IPU-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.
     
    2527* Enter the csv/tsv data directy in you blog or page
    2628* Load the csv/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.
    2730* Create multiple views of the data
    2831* Style the charts with css
     
    3538= Usage =
    3639
    37 *Read our blog [Create a World Map in WordPress](https://www.ipublia.com/create-a-world-map-in-wordpress/ "Create a World Map in WordPress") for a short introduction of the new world map chart.*
    38 
    39 First, define your data. You can create it immediately in WordPress or copy and paste it from an export of your favourite spreadsheet application. Example:
     40First, 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:
    4041
    4142<pre>
     
    1151169. World map chart
    11611710. Bubble chart
     11811. IPU-Chart Editor
    117119
    118120== Changelog ==
     
    163165* Bubble charts added
    164166
     167= 0.6.1 =
     168* Minor update for interoperability with the editor.
     169
    165170== Upgrade Notice ==
    166171
     
    198203* Support for animated, multi-series bubble charts added
    199204
    200 
     205= 0.6.1 =
     206* Minor update for the interoperability with the IPU-Chart Editor
     207
     208
Note: See TracChangeset for help on using the changeset viewer.