[#324] Show full labels on flot bar y-axis
This commit is contained in:
@@ -191,7 +191,7 @@ my.Flot = Backbone.View.extend({
|
|||||||
if (typeof label !== 'string') {
|
if (typeof label !== 'string') {
|
||||||
label = label.toString();
|
label = label.toString();
|
||||||
}
|
}
|
||||||
if (label.length > 8) {
|
if (self.state.attributes.graphType !== 'bars' && label.length > 8) {
|
||||||
label = label.slice(0, 5) + "...";
|
label = label.slice(0, 5) + "...";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,11 +211,15 @@ my.Flot = Backbone.View.extend({
|
|||||||
x = 1,
|
x = 1,
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
while (x <= maxTicks) {
|
// show all ticks in bar graphs
|
||||||
if ((numPoints / x) <= maxTicks) {
|
// for other graphs only show up to maxTicks ticks
|
||||||
break;
|
if (self.state.attributes.graphType !== 'bars') {
|
||||||
|
while (x <= maxTicks) {
|
||||||
|
if ((numPoints / x) <= maxTicks) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
x = x + 1;
|
||||||
}
|
}
|
||||||
x = x + 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < numPoints; i = i + x) {
|
for (i = 0; i < numPoints; i = i + x) {
|
||||||
|
|||||||
Reference in New Issue
Block a user