Commit b69be2ee authored by Masayuki Tanaka's avatar Masayuki Tanaka

Accept string x values as categories when categorized - #94

parent 47988f20
...@@ -1191,7 +1191,7 @@ ...@@ -1191,7 +1191,7 @@
} }
// convert to target // convert to target
targets = ids.map(function (id) { targets = ids.map(function (id, index) {
var convertedId = __data_id_converter(id); var convertedId = __data_id_converter(id);
return { return {
id: convertedId, id: convertedId,
...@@ -1202,9 +1202,16 @@ ...@@ -1202,9 +1202,16 @@
if (isTimeSeries) { if (isTimeSeries) {
x = d[xKey] instanceof Date ? d[xKey] : parseDate(d[xKey]); x = d[xKey] instanceof Date ? d[xKey] : parseDate(d[xKey]);
} }
else if (isCustomX) { else if (isCustomX && !isCategorized) {
x = d[xKey] ? +d[xKey] : getXValue(id, i); x = d[xKey] ? +d[xKey] : getXValue(id, i);
} }
else if (isCustomX && isCategorized) {
x = i;
if (index === 0 && d[xKey]) {
if (i === 0) { __axis_x_categories = []; }
__axis_x_categories.push(d[xKey]);
}
}
else { else {
x = i; x = i;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment