Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha User
Hide ext.chart.Toolbar from ext.chart.Panel
Good morning,<br><br>I'm creating an application for Ipad and i'm using ext.chart.Panel to display some statistics.<br>is there anyway to hide or disable the toolbar automatically generated in ext.chart.Panel ? <br><br>here is the code i'm using<br>
Code:
var chart1 = new Ext.chart.Panel({
style:'background-color:#F00',
width: '50%',
height:'100%',
flex: 1,
items:
{
cls: 'pie1',
theme: 'Demo',
store: store1,
shadow: false,
animate: true,
series: [{
type: 'pie',
field: 'data1',
// showInLegend: true,
// highlight: true,
label: {
field: 'name'
}
}]
}
});
var panelHaut = new Ext.Panel({
width :'100%',
height :'100%',
flex :1,
layout :'hbox',
items:[chart1]
});
i tried this code but the chart is not rendering
Code:
var chart1 = new Ext.chart.Chart({
width: '200',
height: '200',
animate: false,
store: store1,
series: [{
type: 'pie',
field: 'data1',
label: {
field: 'name'
}
}]
});
Could anyone help me ?
-
Sencha Premium Member
Why does your panel have height: 100% and width: 100% when you can do fullscreen: true?
-
Sencha User
Hey, did you got any solution for this?
-
Sencha Premium Member
Oh, I think you have to use the fit layout for the panel holding the chart
-
Sencha User
Using fit layout will hide the title bar? I'm also looking for a solution for hiding the chart panel's default title bar/tool bar.
-
Sencha Premium Member
Sorry, I meant that you can't use Ext.chart.Panel. You'll have to make a Ext.Panel with a fit layout and as one of its items have it be a Ext.chart.Chart
-
Sencha User
Did you find any solution for it? Having the same problem here too.
-
Sencha User
Looking for the solution? Did anyone find it? I dont want my chart to take the fullscreen. I want to place the chart inside the panel. Giving height and width to Ext.chart.Chart does not work - the chart is not displayed inside the panel unless made fullscreen:true..please share the solution if anyone finds it.
Thanks
-
Sencha Premium Member
hidden title bar touch charts
I used a combination of css a javascript to remove the titlebar. I'm sure there is a better way as there still is a 0.1em title bar in generated code. To take it further maybe pass a blank dockedItem to constructor or remove it from render.
Code:
.x-panel-body {
background-color:#FFF !important
}
.x-toolbar {
background-color:#FFF !important
}
Code:
Ext.chart.Panel = Ext.extend(Ext.Panel, {
defaultType: "chart",
layout: "fit",
constructor: function (a) {
a.dockedItems = {
xtype: "panel",
height: "0.1em",
dock: "top",
layout: {
type: "card",
align: "stretch"
},
activeItem: 0,
// dockedItems: {
// dock: "right",
// xtype: "toolbar",
// ui: "light",
// items: a.dockedItems
// },
// items: [{
// dock: "top",
// xtype: "toolbar",
// ui: "light",
// title: a.title || ""
// }, {
// dock: "top",
// xtype: "toolbar",
// ui: "light",
// title: ""
// }
// ]
};
Ext.chart.Panel.superclass.constructor.call(this, a)
},