newsanti Posted March 9 Share Posted March 9 https://fiddle.sencha.com/#fiddle/tf5&view/editor Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 11 Share Posted March 11 Hello @newsanti Well, some solution: function chart.beforeInit(sender, config) { config.series[0].listeners = { chartattached: function(chart, series) { Ext.defer(function() { var surface = chart.getSurface(); var center = chart.getCenter(); var text = 'Custom Text'; sender._customText = surface.add({ type: 'text', text: text, x: center[0], y: center[1], fontSize: 10, fillStyle: 'black', textAlign: 'center', zIndex: 1000 }); chart.redraw(); }, 500); chart.on('resize', function() { if (chart) { Ext.defer(function() { var center = chart.getCenter(); if (chart._customText) { chart._customText.setAttributes({ x: center[0], y: center[1] }); } chart.redraw(); }, 500) } }); } }; } 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.