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

  • Home
  • SEARCH
  • 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 8191701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:58:33+00:00 2026-06-07T03:58:33+00:00

I have a predefined pie chart like this: Ext.create(‘Ext.chart.Chart’, { width : 450, height

  • 0

I have a predefined pie chart like this:

Ext.create('Ext.chart.Chart', {
        width : 450,
        height : 300,
        animate : true,
        store : store,
        theme : 'Base:gradients',
        series : [{
            type : 'pie',
            field : 'data1',
            showInLegend : true,
            tips : {
                trackMouse : true,
                width : 140,
                height : 28,
                renderer : function(storeItem, item) {
                    // calculate and display percentage on hover
                    var total = 0;
                    store.each(function(rec) {
                        total += rec.get('data1');
                    });
                    this.setTitle(storeItem.get('name') + ': ' + Math.round(storeItem.get('data1') / total * 100) + '%');
                }
            },
            highlight : {
                segment : {
                    margin : 20
                }
            },
            label : {
                field : 'name',
                display : 'rotate',
                contrast : true,
                font : '18px Arial'
            }
        }]
    });

Then I created a Container/Panel, here I am using Container.

I am looking for a way to put my pre-defined chart into the Container. I saw some examples they actually define the chart in the Container field, but that’s not what I want. Is there any way that I can put my pre-specified chart in the items field below so that the chart can be rendered?

Ext.create('Ext.container.Container', {
        layout: 'fit',
        width: 600,
        height: 600,
        renderTo: Ext.getBody(),
        border: 1,
        style: {boderColor: '#000000', borderStyle: 'solid', borderWidth: '1px'},
        items: [{

        }]
    });

Thanks

  • 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-07T03:58:34+00:00Added an answer on June 7, 2026 at 3:58 am

    Yes, it’s as simple as:

    var chart = Ext.create('Ext.chart.Chart', {
        animate: true,
        store: store,
        theme: 'Base:gradients',
        series: [{
            type: 'pie',
            field: 'data1',
            showInLegend: true,
            tips: {
                trackMouse: true,
                width: 140,
                height: 28,
                renderer: function(storeItem, item) {
                    // calculate and display percentage on hover
                    var total = 0;
                    store.each(function(rec) {
                        total += rec.get('data1');
                    });
                    this.setTitle(storeItem.get('name') + ': ' + Math.round(storeItem.get('data1') / total * 100) + '%');
                }
            },
            highlight: {
                segment: {
                    margin: 20
                }
            },
            label: {
                field: 'name',
                display: 'rotate',
                contrast: true,
                font: '18px Arial'
            }
        }]
    });
    
    Ext.create('Ext.container.Container', {
        layout: 'fit',
        width: 600,
        height: 600,
        renderTo: Ext.getBody(),
        border: 1,
        style: {
            boderColor: '#000000',
            borderStyle: 'solid',
            borderWidth: '1px'
        },
        items: chart
    }); 
    

    Also note there’s no use specifying dimensions on the chart since it’s being used in a fit layout.

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

Sidebar

Related Questions

This should be incredibly trivial, but it's not. I have a predefined height for
Do you have some predefined set of targets which all build.xml files you create
I have an XML Template file. This file contains a header and some predefined
I have one div with predefined width (say 80px), but the length of the
Suppose I have a div element with height: 150px and width:300px . Is it
Hi I would like to create a Visual Studio snippet that I can have
I have predefined words and would like to know if the sentence primary subject
I have CSS floated elements with predefined width and I want them to transpose
Please help me center a div that does not have a predefined width, inside
Hopefully I am explaining this correctly, I have a long predefined list of items

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.