Results 1 to 5 of 5

Thread: Pie Chart Label gets cut off

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Apr 2014
    Posts
    21
    Vote Rating
    1
      0  

    Default Pie Chart Label gets cut off

    Have anyone seen the same issue as me, when I set the pie chart label display as outside, and use the call out line, some labels got cut off. It doesn't matter if I set the container size to be bigger, the labels still not shown completely. Any suggestions?

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    9,780
    Vote Rating
    258
      0  

    Default

    I haven't heard of this issue. Can you post a test case which exhibits the behavior?
    https://fiddle.sencha.com/#home


    Join me at SenchaCon 2016!

  3. #3
    Sencha User
    Join Date
    Apr 2014
    Posts
    21
    Vote Rating
    1
      0  

    Default Example

    Here's an example. Note the "Metrics One" label gets cut off regardless the font size. Also the calloutLine is not working either.

    I am using Ext JS 4.2.1.

    Ext.application({
    name : 'Pie',

    launch : function() {

    var store = Ext.create('Ext.data.JsonStore', {
    fields: ['name', 'data'],
    data: [
    { 'name': 'metric one', 'data': 10 },
    { 'name': 'metric two', 'data': 7 },
    { 'name': 'metric three', 'data': 5 },
    { 'name': 'metric four', 'data': 2 },
    { 'name': 'metric five', 'data': 27 }
    ]
    });

    Ext.create('Ext.form.Panel', {
    title: 'Simple Form',
    bodyPadding: 5,
    width: 600,
    height: 600,
    layout: 'fit',
    items: [
    {
    xtype: 'chart',
    width: 300,
    height: 300,
    animate: true,
    store: store,
    series: [{
    type: 'pie',
    angleField: 'data',
    label: {
    field: 'name',
    //font: '15px Arial',
    display: 'outside', // inside | outside | rotate | TBD:rotateAuto (rotate if enough room, otherwise outside)
    //calloutLine: {
    //width: 8,
    // color: 'black',
    //length: 10
    //}
    }
    }]

    }],
    renderTo: Ext.getBody()
    })
    }
    });

  4. #4
    Sencha User
    Join Date
    Apr 2014
    Posts
    21
    Vote Rating
    1
      1  

    Default

    Set insertPadding on chart could work around it.

  5. #5
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    9,780
    Vote Rating
    258
      1  

    Default

    Yes, sorry for the delay. The insetPadding config is indeed a good option for you, as it creates more space around the chart. It seems to work better if the chart is not within another panel as you have in your code sample.

    Callout lines to the labels were added in 4.2.2.


    Join me at SenchaCon 2016!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •