0

Using the example from the docs Ext.chart.series.Bar it should be pretty easy to achieve this.

The series has a label config that contains a color properties. Changing this has no effect. Or am I missing something?

I would like to display a white text on top of the bars.

Working code for the example http://jsfiddle.net/dfDb8/

On line 48 I try to set the color to white

    label: {
      display: 'insideStart',
        field: 'data',
        renderer: Ext.util.Format.numberRenderer('0'),
        orientation: 'horizontal',
        color: '#fff' //this is what I want to change
        'text-anchor': 'middle'
    },

Any ideas?

1 Answers1

0

The following attribute:

fill: '#fff'

seems to work. I am not completely sure why though.

Perception
  • 79,279
  • 19
  • 185
  • 195
Hassan Voyeau
  • 3,383
  • 4
  • 22
  • 24
  • I haven't tried fill. I partially does what I want except for the situations when the bar length is small and the label is displayed on the right side. I tried to use also the contrast: true property together with fill to fix this. But when contrast is used together with fill nothings happens. Maybe the implementation is not complete. –  Feb 27 '13 at 07:59
  • @bbb Did you get this figured out? (I know very late response but I am currently reviewing my stackoverflow answers) – Hassan Voyeau Jul 13 '18 at 10:37