dojox/charting/themes/gradientGenerator.js

  • Provides:

    • dojox.charting.themes.gradientGenerator
  • Requires:

    • dojox.charting.Theme in common
  • dojox.charting.themes.gradientGenerator.generateFills

    • type
      Function
    • parameters:
      • colors: (typeof Array)
        Array of colors to generate gradients for each.
      • fillPattern: (typeof Object)
        Gradient fill descriptor which colors list will be generated.
      • lumFrom: (typeof Number)
        Initial luminance value (0-100).
      • lumTo: (typeof Number)
        Final luminance value (0-100).
    • source: [view]
        var Theme = dojox.charting.Theme;
        return dojo.map(colors, function(c){ // Array
         return Theme.generateHslGradient(c, fillPattern, lumFrom, lumTo);
        });
    • summary
      generates 2-color gradients using pure colors, a fill pattern, and two luminance values
    • returns
      Array
  • dojox.charting.themes.gradientGenerator.updateFills

    • type
      Function
    • parameters:
      • themes: (typeof Array)
        Array of mini-themes (usually series themes or marker themes), which fill will be transformed.
      • fillPattern: (typeof Object)
        Gradient fill descriptor which colors list will be generated.
      • lumFrom: (typeof Number)
        Initial luminance value (0-100).
      • lumTo: (typeof Number)
        Final luminance value (0-100).
    • source: [view]
        var Theme = dojox.charting.Theme;
        dojo.forEach(themes, function(t){
         if(t.fill && !t.fill.type){
          t.fill = Theme.generateHslGradient(t.fill, fillPattern, lumFrom, lumTo);
         }
        });
    • summary
      transforms solid color fills into 2-color gradients using a fill pattern, and two luminance values
  • dojox.charting.themes.gradientGenerator.generateMiniTheme

    • type
      Function
    • parameters:
      • colors: (typeof Array)
        Array of colors to generate gradients for each.
      • fillPattern: (typeof Object)
        Gradient fill descriptor which colors list will be generated.
      • lumFrom: (typeof Number)
        Initial luminance value (0-100).
      • lumTo: (typeof Number)
        Final luminance value (0-100).
      • lumStroke: (typeof Number)
        Stroke luminance value (0-100).
    • source: [view]
        var Theme = dojox.charting.Theme;
        return dojo.map(colors, function(c){ // Array
         c = new dojox.color.Color(c);
         return {
          fill: Theme.generateHslGradient(c, fillPattern, lumFrom, lumTo),
          stroke: {color: Theme.generateHslColor(c, lumStroke)}
         }
        });
    • summary
      generates mini-themes with 2-color gradients using colors, a fill pattern, and three luminance values
    • returns
      Array
  • dojox.charting.themes.gradientGenerator.generateGradientByIntensity

    • type
      Function
    • parameters:
      • color: (typeof dojo.Color)
        Color to use to generate gradients.
      • intensityMap: (typeof Array)
        Array of tuples {o, i}, where o is a gradient offset (0-1),
        and i is an intensity (0-255).
    • source: [view]
        color = new dojo.Color(color);
        return dojo.map(intensityMap, function(stop){ // Array
         var s = stop.i / 255;
         return {
          offset: stop.o,
          color: new dojo.Color([color.r * s, color.g * s, color.b * s, color.a])
         };
        });
    • summary
      generates gradient colors using an intensity map
    • returns
      Array
  • dojox.charting.themes.gradientGenerator

    • type
      Object
    • summary
  • dojox.charting.themes

    • type
      Object
    • summary
  • dojox.charting

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary