formatting error for xy line charts, and issue with data that is equal to 0
jhedstrom - April 11, 2008 - 18:03
| Project: | Chart API |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Description
The attached patch fixes:
* an issue where in ",|" was being passed in the url when using xy-line charts
* an issue where legitimate 0 values were being converted to -1. The patch checks for type null rather than a false
| Attachment | Size |
|---|---|
| chart.module.patch | 538 bytes |

#1
#2
I've run into the same 0 value problem. I've fixed it by doing:
if ($v !== 'NULL'){
Instead of:
if ($v != 'NULL'){
In _chart_encode_data.
#3
patch works
#4
I spend a lot of time to find why my pie diagramm is drawning incorrectly.
I have this data for diagramm (after adjusting resolution):
array(6) {[0]=>
float(99)
[1]=>
float(24)
[2]=>
float(8)
[3]=>
float(17)
[4]=>
float(75)
[5]=>
float(0)
}
After
$data['chd'] = 't:' . _chart_encode_data($chart['#data']);in function chart_build($chart) in file chart.module in line 285, I have the following encoded data:array(1) {["chd"]=>
string(18) "t:99,24,8,17,75,-1"
}
And the diagramm looked WRONG.
After applying this patch in the file chart.module in line 384:
if ($v != 'NULL'){-->if ($v !== 'NULL'){Diagramm looks RIGHT.
So, please, commit this very needed patch!
#5
Forget to change the version.
#6
Subscribe.
#7
Dear boombatower,
please, commit fixes for that bug!