简体   繁体   中英

Overlapping Label in IcCube Reporting

I have a problem with overlapping labels in a bar charts.

在此处输入图片说明

The settings in the Axis label appear to be correct, because others settings do affect the rendering (bold, etc..) but spacing does not seem to be taken into account.

在此处输入图片说明

Any way to do a proper spacing of the labels, or actually to rotate them ?

Update1:

After applying the proposed settings this is what I get: 在此处输入图片说明

The labels are rotated but do not fit the widget. I tried updating the margins, without a positive result.

There are no options in the widget fields but you can rotate these labels using the "On Widget Options" hook.

You can find it on "Hooks" tab.

"On Widget Options" hook use this function:

function(context, options, $box) {
    for (var i = 0; i < options.categoryAxis.guides.length; i++) {
        options.categoryAxis.guides[i].labelRotation = 30; // rotation angle
    }
    return options;
}

Available fields for Guides can be checked here

Custom code

在此处输入图片说明

Result 在此处输入图片说明

UPDATE: You can change top margin using this code lines:

options.marginTop = 88; // Top margin

Just add it into "On Widget Options" hook:

function(context, options, $box) {
    options.marginTop = 88; // Top margin
    for (var i = 0; i < options.categoryAxis.guides.length; i++) {
        options.categoryAxis.guides[i].labelRotation = 30;
    }
    return options;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM