Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7840089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:39:17+00:00 2026-06-02T15:39:17+00:00

I am trying to draw an chart inside panel. Chart bars are getting drawn

  • 0

I am trying to draw an chart inside panel. Chart bars are getting drawn correctly but x and y axis labels are not shown when chart is drawn. Code to draw chart is as follows :

Ext.require([
    'Ext.form.*',
    'Ext.chart.*',
    'Ext.layout.container.*'
]);

Ext.define('ilp.view.EmployeeCountControl', {
    extend : 'Ext.panel.Panel',
    alias : 'widget.employeeCountControl',

    require : [
        'ilp.store.Employees',
        'ilp.store.Dimensions'
    ],

    layout : {
        type : 'vbox',
        align : 'stretch',
        pack : 'start'
    },

    title : 'Select dimension to view chart',

    initComponent : function() {
        this.items = [
            {
                xtype : 'combobox',
                fieldLabel : 'Select Dimension',
                store : 'Dimensions',
                queryMode : 'local',
                displayField : 'name',
                valueField : 'dimension',
                flex : 1
            },
            {
                xtype : 'chart',
                title : 'selected dimension',
                store : 'Employees',
                flex : 2,
                width: 150,
                height: 200,
                legend : {
                    position : 'right'
                },
                axes : [
                    {
                        title : 'Emp Count',
                        type : 'Numeric',
                        position : 'left',
                        fields : ['hpCount', 'nonhpCount'],
                        minimum : 0,
                        grid : true
                    },
                    {
                        title : 'selected dimension',
                        type : 'Category',
                        position : 'bottom',
                        fields : ['dimension']
                    }
                ],
                series : [
                    {
                        type : 'bar',
                        column :true,
                        stacked : true,
                        highlight: true,
                        axis : 'left',
                        xField : ['dimension'],
                        yField : ['hpCount', 'nonhpCount'],
                        yPadding : 10
                    }
                ]
            }
        ];
        this.callParent(arguments);
    }
});

and what gets drawn is as follows :

enter image description here

As you can see, title and axis values are not being displayed on chart.

Can anyone please tell me why this is happening??

Thanks in advance !!


EDIT 1

After moving legend to bottom, I got x axis values but now those values are getting hidden behind legend and also those values are going out of panel. Does anyone knows how to decrease the size of actual chart and bars to fit axis values properly? My chart now looks as follows :

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T15:39:20+00:00Added an answer on June 2, 2026 at 3:39 pm

    Set Width and/or Padding to your Layout and/or Panel and see the changes. I think it’s about the chart parent container not the chart itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to draw an pie chart using ExtJS but something is going
I am trying to draw a series of rectangles using OpenGL but some of
I'm trying to draw a vertical scrollbar for my G15 applet, but am having
I am trying to draw a circle using Windows Form at runtime inside a
I am trying to draw a Google Line Chart, where each line may have
I'm trying to style and add another 2 x'axis to a Google area chart
i am trying to draw bar chart for my app using core plot as
I'm just trying to figure out to format my labels to be shown as
I'm trying to draw a chart using JFreeChart on Java! The data in which
I'm trying to draw a map from a textfile onto a Bitmap, but the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.