答案 0 :(得分:0)
categoryAxis: {
field: "PropertyName",
majorGridLines: {
visible: false
},
//visible: true,
labels: {
visible: true,
//rotation: "270"
visual: function(e) {
var html =$('<span class="unselcteddiv">'+capitalise(e.value) + '</span>').appendTo(document.body));
// Create an empty group that will hold the rendered label
var visual = new kendo.drawing.Group();
// Store a reference to the target rectangle, see below
var rect = e.rect;
if(e.dataItem.ShareDiff<0)
{
// debugger;
rect.origin.x =rect.origin.x>0?Math.abs(rect.origin.x)+Math.abs(rect.size.width)+20:rect.origin.x;
}
kendo.drawing.drawDOM(html)
.done(function(group) {
// Clean-up HTML fragment
html.remove();
// Center the label using Layout
var layout = new kendo.drawing.Layout(rect, {
justifyContent: "right"
});
layout.append(group);
layout.reflow();
// Render the content
visual.append(layout);
});
return visual;
}
}
},
我可以使用此代码工作正常。我希望对每一个在这类问题上受苦的人充分利用......