indicator_y = y + opts.legendheight - 42;
}
- paper.rect(x + 1 + (k * barwidth) + 8 , indicator_y, barwidth - 16, 30, 5).attr({ stroke: "none", fill: colors[i%colors.length] });
+ var fontSize = barsteps > 10 ? 10 : 16;
+
+ paper.rect(x + 1 + (k * barwidth) + 5 , indicator_y, barwidth - 10, 30, 5).attr({ stroke: "none", fill: colors[i%colors.length] });
paper.path(["M", x + 1 + (k * barwidth) + barwidth / 4 + 10, indicator_y + 30, "l", 5, 10, "l", 5, -10]).attr({ stroke: "none", fill: colors[i%colors.length] });
paper.text(x + 1 + (k * barwidth) + barwidth / 2, indicator_y + 14, Roo.util.Format.number(v, 0)).attr({
- "font-size": "16",
+ "font-size": fontSize,
"font-family": "'Fontin Sans', Fontin-Sans, sans-serif",
"font-weight": "bold",
fill : "#fff"
max,
opts.axisystep || 10,
opts.asixywidth,
+ barsteps,
paper
)
);
return new MVBarchart(this, x, y, width, height, values, opts);
};
- MVBarchart.prototype.rightAxis = function (x, y, length, max, steps, asixxheight, paper)
+ MVBarchart.prototype.rightAxis = function (x, y, length, max, steps, asixywidth, barsteps, paper)
{
// Roo.log('Right Axis');
-// Roo.log([x, y, length, max, steps, ewidth]);
+// Roo.log([x, y, length, max, steps, asixywidth]);
var path = [],
color = "#bababa",
for(var i = 0; i <= steps; i++) {
if(i != 0) {
- paper.text(x + (asixxheight / 2), Y + 15, label).attr({
- "font-size": "20",
+ paper.text(x + (asixywidth / 2), Y + 15, label).attr({
+ "font-size": (barsteps > 10) ? "14" : "20",
"font-family": "'Fontin Sans', Fontin-Sans, sans-serif",
"font-weight": "bold",
"text-anchor": "end",
fill : color
});
- path = path.concat(["M", x, Y, "l", (asixxheight / 2), 0]);
+ path = path.concat(["M", x, Y, "l", (asixywidth / 2), 0]);
}
labels.forEach(function(v,k) {
paper.text(x + (k * barwidth) + offset, y + (eheight / 2), v).attr({
- "font-size": "20",
+ "font-size": (steps > 10) ? "16" : "20",
"font-family": "'Fontin Sans', Fontin-Sans, sans-serif",
"font-weight": "bold",
fill : color