Changeset 208089
- Timestamp:
- 02/19/2010 09:07:20 PM (16 years ago)
- Location:
- easy-chart-builder/trunk
- Files:
-
- 3 edited
-
easy-chart-builder.php (modified) (3 diffs)
-
js/easy-chart-builder.js (modified) (6 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-chart-builder/trunk/easy-chart-builder.php
r208040 r208089 2 2 /* 3 3 Plugin Name: Easy Chart Builder 4 Version: 0.8 4 Version: 0.8.1 5 5 Plugin URI: http://www.dyerware.com/main/easy-chart-builder 6 6 Description: Creates a chart directly in your post or page via shortcut. Manages sizing of chart to support wptouch and other mobile themes. … … 33 33 { 34 34 $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'); 36 36 } 37 37 … … 125 125 'imgstyle' => 'text-align:center;float:center;', 126 126 'watermark' => '', 127 'watermarkvert' => '', 127 128 'watermarkcolor' => 'A0BAE9', 128 129 'currency' => '', -
easy-chart-builder/trunk/js/easy-chart-builder.js
r208040 r208089 1 1 /** 2 2 * Handle: easyChartBuilder 3 * Version: 0.10 3 * Version: 0.10.1 4 4 * Enqueue: true 5 5 * … … 71 71 72 72 73 var maxMin = this.normalizeValues(chartValues, false, chartHandle );73 var maxMin = this.normalizeValues(chartValues, false, chartHandle, false); 74 74 var chartValuesString = this.encodeValues(chartValues, ""); 75 75 var chartColor = chartHandle["chartcolor"]; … … 125 125 } 126 126 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); 128 134 var minAxis = chartHandle["minaxis"]; 129 135 if (minAxis == "") … … 388 394 }; 389 395 390 easyChartBuilder.prototype.normalizeValues = function(valueGrid, hasAxis, chartHandle )396 easyChartBuilder.prototype.normalizeValues = function(valueGrid, hasAxis, chartHandle, isStacked) 391 397 { 392 398 var len = valueGrid.length; … … 394 400 var t, v, ratio; 395 401 var minAxis = chartHandle["minaxis"]; 402 var currMax; 403 var currGroup; 396 404 397 405 maxMin[0] = valueGrid[0][0]; … … 400 408 scaleMax = 0; 401 409 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++) 406 437 { 407 438 maxMin[0] = Math.max(valueGrid[t][v] , maxMin[0]); 408 439 maxMin[1] = Math.min(valueGrid[t][v] , maxMin[1]); 409 440 } 441 } 410 442 } 411 443 412 444 scaleMax = maxMin[0]; 413 445 414 if ( hasAxis == true && minAxis != "")446 if (isStacked == false && hasAxis == true && minAxis != "") 415 447 { 416 448 var lowValue = parseFloat(minAxis); -
easy-chart-builder/trunk/readme.txt
r208040 r208089 6 6 Requires at least: 2.8 7 7 Tested up to: 2.9.2 8 Stable tag: 0.8 8 Stable tag: 0.8.1 9 9 10 10 This plugin allows you to easily create charts within your blog by use of shortcodes. … … 68 68 == Upgrade Notice == 69 69 70 = 0.8.1 = 71 Fixed stacked charts problem with value axis 72 70 73 = 0.8 = 71 74 Markers, two new chart types, and bugfixes … … 85 88 86 89 == Changelog == 90 91 = 0.8.1 = 92 * Fixed stacked charts problem with value axis 87 93 88 94 = 0.8 =
Note: See TracChangeset
for help on using the changeset viewer.