As someone who is new to Ext JS and Sencha charts, I have encountered a challenge with one of the charts in our application. Specifically, I needed to hide the dashes on the X-Axis of that particular chart. Our application is built using Ext JS version 5.1, which does not seem to have a dashSize property available. After some investigation within the framework, I resorted to implementing an empty override as shown below:
Ext.define('Ext.overrides.chart.axis.sprite.Axis', {
override: 'Ext.chart.axis.sprite.Axis',
renderTicks: function (surface, ctx, layout, clipRect) {
}});
This solution worked perfectly for my current need, but it applied to all charts across the application. Now, I am looking for a way to make this override conditional. I envision something like the following code snippet, although I am unsure how to effectively pass the configuration to the framework:
Ext.define('Ext.overrides.chart.axis.sprite.Axis', {
override: 'Ext.chart.axis.sprite.Axis',
renderTicks: function (surface, ctx, layout, clipRect) {
if(condition)
//empty
else
this.superclass.renderTicks.call();
}});
If anyone has insights on how to achieve this conditional override or requires additional details from me, your help would be greatly appreciated!