Skip to content

Commit

Permalink
Provide float values
Browse files Browse the repository at this point in the history
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
  • Loading branch information
madhuracj committed Dec 25, 2013
1 parent 5218fd0 commit 2ac4e71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions js/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,14 +414,13 @@ JQPlotScatterChart.prototype.prepareData = function (dataTable) {
for (var i = 0; i < data.length; i++) {
row = data[i];
if (row[0]) {
var x = parseFloat(row[0]);
for (var j = 1; j < row.length; j++) {
retRow = retData[j - 1];
if (retRow === undefined) {
retRow = [];
retData[j - 1] = retRow;
}
retRow.push([x, row[j]]);
retRow.push([row[0], row[j]]);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions js/tbl_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ function PMA_queryChart(data, columnNames, settings) {
if (j === 0) {
if (settings.type == 'timeline') { // first column is date type
newRow.push(extractDate(row[col]));
} else if (settings.type == 'scatter') {
newRow.push(parseFloat(row[col]));
} else { // first column is string type
newRow.push(row[col]);
}
Expand Down

0 comments on commit 2ac4e71

Please sign in to comment.