/** * @class Ext.chart.theme.Base * @extend Ext.chart.theme.BaseTheme * * Abstract class that provides default styles for non-specified things. * Should be sub-classed when creating new themes. * For example: * * Ext.define('Ext.chart.theme.Custom', { * extend: 'Ext.chart.theme.Base', * singleton: true, * alias: 'chart.theme.custom', * config: { * baseColor: '#ff9f00' * } * }); * * Theme provided values will not override the values provided in an instance config. * However, if a theme provided value is an object, it will be merged with the value * from the instance config, unless the theme provided object has a '$default' key * set to 'true'. * * Certain chart theme configs (e.g. 'fontSize') may use the 'default' value to indicate * that they should inherit a value from the corresponding CSS style provided by * a framework theme. Additionally, one can use basic binary operators like multiplication, * addition and subtraction to derive from the default value, e.g. fontSize: 'default*1.3'. * * Important: the theme should not use the 'font' shorthand to specify the font of labels * and other text elements of a chart. Instead, individual font properties should be used: * 'fontStyle', 'fontVariant', 'fontWeight', 'fontSize' and 'fontFamily'. */ /** * @cfg {String/Ext.util.Color} [baseColor=null] * The base color used to generate the {@link Ext.chart.AbstractChart#colors} * of the theme. * @accessor */ /** * @cfg {Array} [colors=undefined] * * Array of colors/gradients to be used by the theme. * Defaults to {@link #colorDefaults}. * @accessor */ /** * @cfg {Object} [gradients=null] * * The gradient config to be used by series' sprites. E.g.: * * { * type: 'linear', * degrees: 90 * } * * Please refer to the documentation for the {@link Ext.draw.gradient.Linear linear} * and {@link Ext.draw.gradient.Radial radial} gradients for all possible options. * The color {@link Ext.draw.gradient.Gradient#stops stops} for the gradients * will be generated by the theme based on the {@link #colors} config. * @accessor */ /** * @cfg {Object} chart * Theme defaults for the chart. * Can apply to all charts or just a specific type of chart. * For example: * * chart: { * defaults: { * background: 'lightgray' * }, * polar: { * background: 'green' * } * } * * The values from the chart.defaults and chart.*type* configs (where *type* is a valid * chart xtype, e.g. '{@link Ext.chart.CartesianChart cartesian}' or '{@link Ext.chart.PolarChart polar}') * will be applied to corresponding chart configs. * E.g., the chart.defaults.background config will set the {@link Ext.chart.AbstractChart#background} * config of all charts, where the chart.cartesian.flipXY config will only set the * {@link Ext.chart.CartesianChart#flipXY} config of all cartesian charts. * @accessor */ /** * @cfg {Object} axis * Theme defaults for the axes. * Can apply to all axes or only axes with a specific position. * For example: * * axis: { * defaults: { * style: {strokeStyle: 'red'} * }, * left: { * title: {fillStyle: 'green'} * } * } * * The values from the axis.defaults and axis.*position* configs (where *position* * is a valid axis {@link Ext.chart.axis.Axis#position}, e.g. 'bottom') will be * applied to corresponding {@link Ext.chart.axis.Axis axis} configs. * E.g., the axis.defaults.label config will apply to the {@link Ext.chart.axis.Axis#label} * config of all axes, where the axis.left.titleMargin config will only apply to the * {@link Ext.chart.axis.Axis#titleMargin} config of all axes positioned to the left. * @accessor */ /** * @cfg {Object} series * Theme defaults for the series. * Can apply to all series or just a specific type of series. * For example: * * series: { * defaults: { * style: { * lineWidth: 2 * } * }, * bar: { * animation: { * easing: 'bounceOut', * duration: 1000 * } * } * } * * The values from the series.defaults and series.*type* configs (where *type* * is a valid series {@link Ext.chart.series.Series#type}, e.g. 'line') will be * applied to corresponding series configs. * E.g., the series.defaults.label config will apply to the {@link Ext.chart.series.Series#label} * config of all series, where the series.line.step config will only apply to the * {@link Ext.chart.series.Line#step} config of {@link Ext.chart.series.Line line} series. * @accessor */ /** * @cfg {Object} sprites * Default style for the custom chart sprites by type. * For example: * * sprites: { * text: { * fontWeight: 300 * } * } * * These sprite attribute overrides will apply to custom sprites of all charts * specified using the {@link Ext.draw.Container#sprites} config. * The overrides are specified by sprite type, e.g. sprites.text config * tells to apply given attributes to all {@link Ext.draw.sprite.Text text} sprites. * @accessor */ /** * Style information for the {Ext.chart.legend.SpriteLegend sprite legend}. * If the {@link Ext.chart.legend.Legend DOM} legend is used, this config is ignored. * For additional details see {@link Ext.chart.AbstractChart#legend}. * @cfg {Object} legend * @cfg {Ext.chart.legend.sprite.Item} legend.item * @cfg {Object} legend.border See {@link Ext.chart.legend.SpriteLegend#border}. * @accessor */