Package org.pentaho.reporting.libraries.libsparklines

Examples of org.pentaho.reporting.libraries.libsparklines.LineGraphDrawable


  public Object getValue()
  {
    final Number[] data = getData();
    if ("line".equals(type))
    {
      final LineGraphDrawable drawable = new LineGraphDrawable();
      drawable.setBackground(backgroundColor);
      drawable.setColor(color);
      drawable.setSpacing(spacing);
      drawable.setData(data);
      return drawable;
    }
    else if ("bar".equals(type))
    {
      final BarGraphDrawable drawable = new BarGraphDrawable();
      drawable.setBackground(backgroundColor);
      drawable.setColor(color);
      drawable.setHighColor(highColor);
      drawable.setLastColor(lastColor);
      drawable.setData(data);
      drawable.setSpacing(spacing);
      return drawable;
    }
    else if ("pie".equals(type))
    {
      final PieGraphDrawable drawable = new PieGraphDrawable();
      if (data.length < 1)
      {
        return null;
      }
      drawable.setValue(data[0]);
      drawable.setColor(color);
      drawable.setBackground(backgroundColor);
      drawable.setLowColor(lowColor);
      drawable.setHighColor(highColor);
      drawable.setMediumColor(mediumColor);
      drawable.setCounterClockWise(counterClockWise);
      drawable.setStartAngle(startAngle);
      if (lowSlice != null)
      {
        drawable.setLowSlice(lowSlice);
      }
      if (mediumSlice != null)
      {
        drawable.setMediumSlice(mediumSlice);
      }
      if (highSlice != null)
      {
        drawable.setHighSlice(highSlice);
      }

      return drawable;
    }
    return null;
View Full Code Here


    }

    final int spacing = ElementTypeUtils.getIntAttribute
        (element, SparklineAttributeNames.NAMESPACE, SparklineAttributeNames.SPACING, 2);

    final LineGraphDrawable drawable = new LineGraphDrawable();
    drawable.setData(numbers);
    drawable.setSpacing(spacing);
    return new LineSparklinesWrapper(drawable);
  }
View Full Code Here

    }

    final int spacing = ElementTypeUtils.getIntAttribute
        (element, SparklineAttributeNames.NAMESPACE, SparklineAttributeNames.SPACING, 2);

    final LineGraphDrawable drawable = new LineGraphDrawable();
    drawable.setData(numbers);
    drawable.setSpacing(spacing);
    return new LineSparklinesWrapper(drawable);
  }
View Full Code Here

  public Object getValue()
  {
    final Number[] data = getData();
    if ("line".equals(type))
    {
      final LineGraphDrawable drawable = new LineGraphDrawable();
      drawable.setBackground(backgroundColor);
      drawable.setColor(color);
      drawable.setSpacing(spacing);
      drawable.setData(data);
      return drawable;
    }
    else if ("bar".equals(type))
    {
      final BarGraphDrawable drawable = new BarGraphDrawable();
      drawable.setBackground(backgroundColor);
      drawable.setColor(color);
      drawable.setHighColor(highColor);
      drawable.setLastColor(lastColor);
      drawable.setData(data);
      drawable.setSpacing(spacing);
      return drawable;
    }
    else if ("pie".equals(type))
    {
      final PieGraphDrawable drawable = new PieGraphDrawable();
      if (data.length < 1)
      {
        return null;
      }
      drawable.setValue(data[0]);
      drawable.setColor(color);
      drawable.setBackground(backgroundColor);
      drawable.setLowColor(lowColor);
      drawable.setHighColor(highColor);
      drawable.setMediumColor(mediumColor);
      drawable.setCounterClockWise(counterClockWise);
      drawable.setStartAngle(startAngle);
      if (lowSlice != null)
      {
        drawable.setLowSlice(lowSlice);
      }
      if (mediumSlice != null)
      {
        drawable.setMediumSlice(mediumSlice);
      }
      if (highSlice != null)
      {
        drawable.setHighSlice(highSlice);
      }

      return drawable;
    }
    return null;
View Full Code Here

    }

    final int spacing = ElementTypeUtils.getIntAttribute
        (element, SparklineAttributeNames.NAMESPACE, SparklineAttributeNames.SPACING, 2);

    final LineGraphDrawable drawable = new LineGraphDrawable();
    drawable.setData(numbers);
    drawable.setSpacing(spacing);
    return new LineSparklinesWrapper(drawable);
  }
View Full Code Here

    }

    final int spacing = ElementTypeUtils.getIntAttribute
        (element, SparklineAttributeNames.NAMESPACE, SparklineAttributeNames.SPACING, 2);

    final LineGraphDrawable drawable = new LineGraphDrawable();
    drawable.setData(numbers);
    drawable.setSpacing(spacing);
    return new LineSparklinesWrapper(drawable);
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.libsparklines.LineGraphDrawable

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.