Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Binding to DataPoint.Fill
posted

We are populating the DataPoints in a pie chart dynamically based off user options.  Their could be 1 to X number of DataPoints so we want to let the control select the colors for the DataPoint.Fill.  However we are creating our own legend for styling purposes.  I want to programactically bind the DataPoint.Fill to my ellipse.Fill in my key, but have not been successful.  If I populate the DataPoint.Fill with a color my binding works fine, but it doesn't seem to work with the chart's auto color.  Is there something else I should bind to or is there an enum of your colors I could access to populate my key in the same order???

Parents
No Data
Reply
  • 28496
    Offline posted

     the first 7 colors used in the chart are as follows, the rest will be randomly generated...

                _randomColors[0] = Color.FromRgb(0x46, 0x82, 0xb4);
                _randomColors[1] = Color.FromRgb(0x41, 0x69, 0xe1);
                _randomColors[2] = Color.FromRgb(0x64, 0x95, 0xed);
                _randomColors[3] = Color.FromRgb(0xb0, 0xc4, 0xde);
                _randomColors[4] = Color.FromRgb(0x7b, 0x68, 0xee);
                _randomColors[5] = Color.FromRgb(0x6a, 0x5a, 0xcd);
                _randomColors[6] = Color.FromRgb(0x48, 0x3d, 0x8b);
                _randomColors[7] = Color.FromRgb(0x19, 0x19, 0x70);

     

    i'm not quite sure what you're trying to do with the binding, though; maybe if you posted some sample code i could help figure out what's wrong.

Children
No Data