Package com.sencha.gxt.chart.client.draw

Examples of com.sencha.gxt.chart.client.draw.Color


*/
public class AreaHighlighter implements SeriesHighlighter {

  @Override
  public void highlight(Sprite sprite) {
    Color fill = sprite.getFill();
    if (fill instanceof RGB) {
      RGB rgb = (RGB) fill;
      sprite.setFill(rgb.getLighter(0.2));
      sprite.redraw();
    }
View Full Code Here


    }
  }

  @Override
  public void unHighlight(Sprite sprite) {
    Color fill = sprite.getFill();
    if (fill instanceof RGB) {
      RGB rgb = (RGB) fill;
      sprite.setFill(rgb.getDarker(0.2));
      sprite.redraw();
    }
View Full Code Here

      splitAngle = splitAngle * Math.PI / 180;

      if (needleSprite == null) {
        needleSprite = new PathSprite();
        needleSprite.setStrokeWidth(4);
        needleSprite.setStroke(new Color("#222"));
        chart.addSprite(needleSprite);
      }

      if (chart.isAnimated() && needleSlice != null) {
        Slice old = needleSlice;
View Full Code Here

      shadowed = false;
    }
  }

  protected void setLabelContrast(Sprite label, SeriesLabelConfig<M> config, Sprite sprite) {
    Color fill = config.getSpriteConfig().getFill();
    Color spriteFill = sprite.getFill();
    double labelBrightness;
    if (fill instanceof RGB && spriteFill instanceof RGB) {
      RGB rgb = (RGB) fill;
      RGB rgbSprite = (RGB) spriteFill;
      if (config.getLabelPosition() != LabelPosition.OUTSIDE) {
View Full Code Here

      stroke = createNode("stroke");
      element.setPropertyJSO("stroke", stroke);
      element.appendChild(stroke);
    }

    Color strokeColor = sprite.getStroke();
    if (strokeColor == null || strokeColor == Color.NONE || sprite.getStrokeWidth() == 0.0) {
      stroke.setPropertyBoolean("on", false);
    } else {
      stroke.setPropertyBoolean("on", true);

      if (strokeColor != null && !(strokeColor instanceof Gradient)) {
        // VML does NOT support a gradient stroke :(
        stroke.setPropertyString("color", strokeColor.getColor());
      }

      if (sprite instanceof PathSprite) {
        PathSprite path = (PathSprite) sprite;
        if (path.getStrokeLineCap() != null) {
View Full Code Here

    axis.setTitleConfig(title);   
    axis.setDisplayGrid(true);
    axis.setWidth(50);
    PathSprite odd = new PathSprite();
    odd.setOpacity(1);
    odd.setFill(new Color("#ddd"));
    odd.setStroke(new Color("#bbb"));
    odd.setStrokeWidth(0.5);
    axis.setGridOddConfig(odd);
    chart.addAxis(axis);

    timeAxis.setField(new MapTimeProvider());
View Full Code Here

  private BarSeries<TimeSeriesDataVO> createBar(String seriesName) {
    MapValueProvider valueProvider = new MapValueProvider(seriesName);
    BarSeries<TimeSeriesDataVO> series = new BarSeries<TimeSeriesDataVO>();
    series.setYAxisPosition(Position.LEFT);
    Color color = new RGB((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random() * 255));
    series.setStroke(color);
    series.setStrokeWidth(3);
    series.setColumn(true);
    //series.setShowMarkers(true);
    Sprite marker = Primitives.circle(0, 0, 6);
View Full Code Here

    axis.setTitleConfig(title);
    axis.setMinorTickSteps(1);
    axis.setDisplayGrid(true);
    PathSprite odd = new PathSprite();
    odd.setOpacity(1);
    odd.setFill(new Color("#ddd"));
    odd.setStroke(new Color("#bbb"));
    odd.setStrokeWidth(0.5);
    axis.setGridOddConfig(odd);
    chart.addAxis(axis);

    timeAxis.setField(new MapTimeProvider());
View Full Code Here

  private LineSeries<TimeSeriesDataVO> createLine(String seriesName) {
    MapValueProvider valueProvider = new MapValueProvider(seriesName);
    LineSeries<TimeSeriesDataVO> series = new LineSeries<TimeSeriesDataVO>();
    series.setYAxisPosition(Position.LEFT);
    Color color = new RGB((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random() * 255));
    series.setStroke(color);
    series.setStrokeWidth(3);
    series.setShowMarkers(true);
    Sprite marker = Primitives.circle(0, 0, 6);
    marker.setFill(color);
View Full Code Here

TOP

Related Classes of com.sencha.gxt.chart.client.draw.Color

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.