Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jul 2011
    Location
    Holland
    Posts
    95
    Answers
    2
    Vote Rating
    0
    mrduck is an unknown quantity at this point

      0  

    Lightbulb Unanswered: Bar-chart: Bar color based on a value in the Store

    Unanswered: Bar-chart: Bar color based on a value in the Store


    G'day everyone,

    I'm working on a visualization in the form of a bar-chart. If the value is within the range, the bar has to be green. If the value is a bit out of it, it has to be orange. If the value is way over, the bar has to be red.
    The color codes are provided in the store, since the calculation is processed by the backend.

    I just can't find how to alter the color of individual bars based on a Store value. Can anyone help me out?

    Thank you all.

    Renko.

  2. #2
    Sencha User
    Join Date
    Jul 2011
    Posts
    12
    Vote Rating
    0
    Cangot is on a distinguished road

      0  

    Default


    Hi,

    I have this code working for column series :

    Code:
    series: [{
      type: 'column',
      axis: 'left',
        highlight: {
        fill: '#255375',
            stroke: '#fff'
      },
      stacked: true,
      xField: ['n'],
      yField: ['CA','MS'],
      title:  ['CA','MS'],
      renderer: function(sprite, storeItem, barAttr, i, store) {                   
                            barAttr.fill = colors[i %  2];
                            barAttr.opacity=0.8;
                            return barAttr;
                        }
    }]
    Colors is an array of colors using gradients in my case. But you will juste have to get your color from storeItem.data I guess.
    Code:
    colors: ['url(#v-1)', 'url(#v-2)']

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar