1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    24
    Vote Rating
    0
    mgtneven is an unknown quantity at this point

      0  

    Default Unanswered: Develop Chart Theme

    Unanswered: Develop Chart Theme


    Hi all!

    I need to develop general theme to use in several types of charts (pie, column, etc.).

    The ptoblem is that I need to change the colors of the series- based on the number of series I have in the chart in real-time.

    Colors for chart series is determined by the chart base color provided in the theme defaults. Default base color is then used to calculate the colors for other series as needed. These calculations are based on dividing the hue value by the number of series colors needed. Saturation and lightness values are not changed.

    My base color is: HSL: Hue=210deg; Saturation=43%; Lightness=55% , HEX: # 5588BB

    For multi series charts the hue value (0 – 360 deg) will be divided by the number of required series distributing the colors across the spectrum.

    For example:

    3 series chart: 360/3=120, so:
    base heu is: 210deg.
    slice 2: H210+120deg= H300.
    slice 3: H300+120deg=H90.

    7 series chart: 360/7=~52, so:
    base heu is: 210deg.
    slice 2:H210+52deg=H262.
    slice 2:H262+52deg=H314.
    slice 2:H314+52deg=H6.
    slice 2:H6+52deg=H58.
    slice 2:H58+52deg=H110.
    slice 2:H110+52deg=H162.

    and so on...

    It is not simple, I know.

    Any idea? it will be helpful!!!

    Many thanks.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,677
    Answers
    3355
    Vote Rating
    749
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      1  

    Default


    In the constructor, if you can get the chart's number of series then you can set what you want or you can pass int he number of series. Not sure if you can do it dynamically like you want... haven't seen it done before.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

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