Commit 91d0ed56 authored by Feng Xue's avatar Feng Xue

Remove the unnecessary name beside/below the stacked bar/column chart when only one break variable

Change the tag to v0.5.1

Fixes #1829
parent 228308de
{
"name": "nsdcharts",
"version": "0.5.0",
"version": "0.5.1",
"main": "src/nsdcharts.js",
"ignore": [
"**/.*",
......
{
"name": "nsdcharts",
"version": "0.5.0",
"version": "0.5.1",
"devDependencies": {
"grunt-bower-task": "latest",
"grunt": "latest",
......
......@@ -167,7 +167,7 @@
return colors;
},
setxAxis = function (data) {
setxAxis = function (data, properties) {
var xAxis = {'title': {}},
variable;
if (0 !== getLength(data.columnVariables)) {
......@@ -187,9 +187,13 @@
if (isMeasureVariable(variable)) {
xAxis.labels = {'enabled': false};
} else {
xAxis.categories = variable.categories.map(function (category) {
return category.label;
});
if (properties.stacked) {
xAxis.categories = [" "];
} else {
xAxis.categories = variable.categories.map(function (category) {
return category.label;
});
}
}
}
return xAxis;
......@@ -356,7 +360,7 @@
if (0 !== getLength(colors)) {
chartResult.colors = colors;
}
chartResult.xAxis = setxAxis(data);
chartResult.xAxis = setxAxis(data, properties);
chartResult.yAxis = setyAxis(properties);
chartResult.series = setSeriesData(data, properties);
return chartResult;
......
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