Plugin Directory

Changeset 208089


Ignore:
Timestamp:
02/19/2010 09:07:20 PM (16 years ago)
Author:
dugbug
Message:

0.8.1

Location:
easy-chart-builder/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • easy-chart-builder/trunk/easy-chart-builder.php

    r208040 r208089  
    22/*
    33Plugin Name: Easy Chart Builder
    4 Version: 0.8
     4Version: 0.8.1
    55Plugin URI: http://www.dyerware.com/main/easy-chart-builder
    66Description: Creates a chart directly in your post or page via shortcut.  Manages sizing of chart to support wptouch and other mobile themes.
     
    3333    {   
    3434        $jsDir = get_option('siteurl') . '/wp-content/plugins/easy-chart-builder/js/';
    35         wp_register_script('wpEasyCharts', "{$jsDir}easy-chart-builder.js", false, '0.10');       
     35        wp_register_script('wpEasyCharts', "{$jsDir}easy-chart-builder.js", false, '0.10.1');       
    3636    }
    3737
     
    125125                'imgstyle' => 'text-align:center;float:center;',
    126126                'watermark' => '',
     127                'watermarkvert' => '',
    127128                'watermarkcolor' => 'A0BAE9',
    128129                'currency' => '',
  • easy-chart-builder/trunk/js/easy-chart-builder.js

    r208040 r208089  
    11/**
    22 * Handle: easyChartBuilder
    3  * Version: 0.10
     3 * Version: 0.10.1
    44 * Enqueue: true
    55 *
     
    7171
    7272   
    73     var maxMin = this.normalizeValues(chartValues, false, chartHandle);   
     73    var maxMin = this.normalizeValues(chartValues, false, chartHandle, false);   
    7474    var chartValuesString = this.encodeValues(chartValues, "");
    7575    var chartColor = chartHandle["chartcolor"];   
     
    125125    }
    126126   
    127     var maxMin = this.normalizeValues(chartValues, true, chartHandle); 
     127    var isStacked = false;
     128    if (chartType == "horizbarstack" || chartType == "vertbarstack")
     129    {
     130        isStacked = true;
     131    }
     132   
     133    var maxMin = this.normalizeValues(chartValues, true, chartHandle, isStacked); 
    128134    var minAxis = chartHandle["minaxis"];
    129135    if (minAxis == "")
     
    388394};
    389395     
    390 easyChartBuilder.prototype.normalizeValues = function(valueGrid, hasAxis, chartHandle)
     396easyChartBuilder.prototype.normalizeValues = function(valueGrid, hasAxis, chartHandle, isStacked)
    391397{
    392398    var len = valueGrid.length;
     
    394400    var t, v, ratio;
    395401    var minAxis = chartHandle["minaxis"];
     402    var currMax;
     403    var currGroup;
    396404   
    397405    maxMin[0] = valueGrid[0][0];
     
    400408    scaleMax = 0;
    401409   
    402            
    403     for (t = 0; t < len; t++)
    404     {
    405         for (v = 0; v < valueGrid[t].length; v++)
     410    if (isStacked)
     411    {
     412        for (v = 0; v < valueGrid[0].length; v++)
     413        {
     414            currGroup = 0;
     415            for (t = 0; t < len; t++)
     416            {
     417                currGroup += valueGrid[t][v];
     418            }
     419           
     420            if (v)
     421            {
     422                maxMin[0] = Math.max(currGroup , maxMin[0]);
     423                maxMin[1] = Math.min(currGroup, maxMin[1]);
     424            }
     425            else
     426            {
     427                maxMin[0] = currGroup;
     428                maxMin[1] = currGroup;
     429            }
     430        }       
     431    }
     432    else
     433    {       
     434        for (t = 0; t < len; t++)
     435        {
     436            for (v = 0; v < valueGrid[t].length; v++)
    406437            {
    407438                maxMin[0] = Math.max(valueGrid[t][v] , maxMin[0]);
    408439                maxMin[1] = Math.min(valueGrid[t][v] , maxMin[1]);
    409440            }
     441        }
    410442    }
    411443   
    412444    scaleMax = maxMin[0];
    413445   
    414     if (hasAxis == true && minAxis != "")
     446    if (isStacked == false && hasAxis == true && minAxis != "")
    415447    {
    416448        var lowValue = parseFloat(minAxis);
  • easy-chart-builder/trunk/readme.txt

    r208040 r208089  
    66Requires at least: 2.8
    77Tested up to: 2.9.2
    8 Stable tag: 0.8
     8Stable tag: 0.8.1
    99
    1010This plugin allows you to easily create charts within your blog by use of shortcodes.
     
    6868== Upgrade Notice ==
    6969
     70= 0.8.1 =
     71Fixed stacked charts problem with value axis
     72
    7073= 0.8 =
    7174Markers, two new chart types, and bugfixes
     
    8588
    8689== Changelog ==
     90
     91= 0.8.1 =
     92 * Fixed stacked charts problem with value axis
    8793
    8894= 0.8 =
Note: See TracChangeset for help on using the changeset viewer.