• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java FillOutsideLine类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.achartengine.renderer.XYSeriesRenderer.FillOutsideLine的典型用法代码示例。如果您正苦于以下问题:Java FillOutsideLine类的具体用法?Java FillOutsideLine怎么用?Java FillOutsideLine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FillOutsideLine类属于org.achartengine.renderer.XYSeriesRenderer包,在下文中一共展示了FillOutsideLine类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: execute

import org.achartengine.renderer.XYSeriesRenderer.FillOutsideLine; //导入依赖的package包/类
/**
 * Executes the chart demo.
 * 
 * @param context the context
 * @return the built intent
 */
public Intent execute(Context context) {
  String[] titles = new String[] { "Sales growth January 1995 to December 2000" };
  List<Date[]> dates = new ArrayList<Date[]>();
  List<double[]> values = new ArrayList<double[]>();
  Date[] dateValues = new Date[] { new Date(95, 0, 1), new Date(95, 3, 1), new Date(95, 6, 1),
      new Date(95, 9, 1), new Date(96, 0, 1), new Date(96, 3, 1), new Date(96, 6, 1),
      new Date(96, 9, 1), new Date(97, 0, 1), new Date(97, 3, 1), new Date(97, 6, 1),
      new Date(97, 9, 1), new Date(98, 0, 1), new Date(98, 3, 1), new Date(98, 6, 1),
      new Date(98, 9, 1), new Date(99, 0, 1), new Date(99, 3, 1), new Date(99, 6, 1),
      new Date(99, 9, 1), new Date(100, 0, 1), new Date(100, 3, 1), new Date(100, 6, 1),
      new Date(100, 9, 1), new Date(100, 11, 1) };
  dates.add(dateValues);

  values.add(new double[] { 4.9, 5.3, 3.2, 4.5, 6.5, 4.7, 5.8, 4.3, 4, 2.3, -0.5, -2.9, 3.2, 5.5,
      4.6, 9.4, 4.3, 1.2, 0, 0.4, 4.5, 3.4, 4.5, 4.3, 4 });
  int[] colors = new int[] { Color.BLUE };
  PointStyle[] styles = new PointStyle[] { PointStyle.POINT };
  XYMultipleSeriesRenderer renderer = buildRenderer(colors, styles);
  setChartSettings(renderer, "Sales growth", "Date", "%", dateValues[0].getTime(),
      dateValues[dateValues.length - 1].getTime(), -4, 11, Color.GRAY, Color.LTGRAY);
  renderer.setYLabels(10);
  renderer.setXRoundedLabels(false);
  XYSeriesRenderer xyRenderer = (XYSeriesRenderer) renderer.getSeriesRendererAt(0);
  FillOutsideLine fill = FillOutsideLine.BOUNDS_BELOW;
  fill.setColor(Color.MAGENTA);
  xyRenderer.addFillOutsideLine(fill);
  fill = FillOutsideLine.BOUNDS_ABOVE;
  fill.setColor(Color.GREEN);
  xyRenderer.addFillOutsideLine(fill);

  return ChartFactory.getTimeChartIntent(context, buildDateDataset(titles, dates, values),
      renderer, "MMM yyyy");
}
 
开发者ID:InQBarna,项目名称:AChartEngine,代码行数:40,代码来源:SalesGrowthChart.java


示例2: execute

import org.achartengine.renderer.XYSeriesRenderer.FillOutsideLine; //导入依赖的package包/类
/**
 * Executes the chart demo.
 * 
 * @param context the context
 * @return the built intent
 */
public Intent execute(Context context) {
  String[] titles = new String[] { "Sales growth January 1995 to December 2000" };
  List<Date[]> dates = new ArrayList<Date[]>();
  List<double[]> values = new ArrayList<double[]>();
  Date[] dateValues = new Date[] { new Date(95, 0, 1), new Date(95, 3, 1), new Date(95, 6, 1),
      new Date(95, 9, 1), new Date(96, 0, 1), new Date(96, 3, 1), new Date(96, 6, 1),
      new Date(96, 9, 1), new Date(97, 0, 1), new Date(97, 3, 1), new Date(97, 6, 1),
      new Date(97, 9, 1), new Date(98, 0, 1), new Date(98, 3, 1), new Date(98, 6, 1),
      new Date(98, 9, 1), new Date(99, 0, 1), new Date(99, 3, 1), new Date(99, 6, 1),
      new Date(99, 9, 1), new Date(100, 0, 1), new Date(100, 3, 1), new Date(100, 6, 1),
      new Date(100, 9, 1), new Date(100, 11, 1) };
  dates.add(dateValues);

  values.add(new double[] { 4.9, 5.3, 3.2, 4.5, 6.5, 4.7, 5.8, 4.3, 4, 2.3, -0.5, -2.9, 3.2, 5.5,
      4.6, 9.4, 4.3, 1.2, 0, 0.4, 4.5, 3.4, 4.5, 4.3, 4 });
  int[] colors = new int[] { Color.BLUE };
  PointStyle[] styles = new PointStyle[] { PointStyle.POINT };
  XYMultipleSeriesRenderer renderer = buildRenderer(colors, styles);
  setChartSettings(renderer, "Sales growth", "Date", "%", dateValues[0].getTime(),
      dateValues[dateValues.length - 1].getTime(), -4, 11, Color.GRAY, Color.LTGRAY);
  renderer.setYLabels(10);
  renderer.setXLabelMinimumDistance(3. * 30. * 24. * 60. * 60. * 1000.);
  renderer.setYLabelMinimumDistance(0.01, 0);
  renderer.setXZoomMax(3. * 30. * 24. * 60. * 60. * 1000.);
  XYSeriesRenderer xyRenderer = (XYSeriesRenderer) renderer.getSeriesRendererAt(0);
  FillOutsideLine f = FillOutsideLine.BELOW;
  f.setGradient(true);
  f.setColor(0x80000000);
  f.setColor2(0xff0000ff);
  xyRenderer.addFillOutsideLine(f);
  xyRenderer.setPointStyle(PointStyle.CIRCLE);
  xyRenderer.setPointStrokeWidth(3);
  return ChartFactory.getTimeChartIntent(context, buildDateDataset(titles, dates, values),
      renderer, "MMM yyyy");
}
 
开发者ID:InQBarna,项目名称:AChartEngine,代码行数:42,代码来源:SalesGrowthStyledChart.java


示例3: execute

import org.achartengine.renderer.XYSeriesRenderer.FillOutsideLine; //导入依赖的package包/类
/**
 * Executes the chart demo.
 * 
 * @param context the context
 * @return the built intent
 */
public Intent execute(Context context) {
  String[] titles = new String[] { "Sales for 2008", "Sales for 2007",
      "Difference between 2008 and 2007 sales" };
  List<double[]> values = new ArrayList<double[]>();
  values.add(new double[] { 14230, 12300, 14240, 15244, 14900, 12200, 11030, 12000, 12500, 15500,
      14600, 15000 });
  values.add(new double[] { 10230, 10900, 11240, 12540, 13500, 14200, 12530, 11200, 10500, 12500,
      11600, 13500 });
  int length = values.get(0).length;
  double[] diff = new double[length];
  for (int i = 0; i < length; i++) {
    diff[i] = values.get(0)[i] - values.get(1)[i];
  }
  values.add(diff);
  int[] colors = new int[] { Color.BLUE, Color.CYAN, Color.GREEN };
  PointStyle[] styles = new PointStyle[] { PointStyle.POINT, PointStyle.POINT, PointStyle.POINT };
  XYMultipleSeriesRenderer renderer = buildRenderer(colors, styles);
  setChartSettings(renderer, "Monthly sales in the last 2 years", "Month", "Units sold", 0.75,
      12.25, -5000, 19000, Color.GRAY, Color.LTGRAY);
  renderer.setXLabels(12);
  renderer.setYLabels(10);
  renderer.setChartTitleTextSize(20);
  renderer.setTextTypeface("sans_serif", Typeface.BOLD);
  renderer.setLabelsTextSize(14f);
  renderer.setAxisTitleTextSize(15);
  renderer.setLegendTextSize(15);
  length = renderer.getSeriesRendererCount();

  for (int i = 0; i < length; i++) {
    XYSeriesRenderer seriesRenderer = (XYSeriesRenderer) renderer.getSeriesRendererAt(i);
    if (i == length - 1) {
      FillOutsideLine fill = new FillOutsideLine(FillOutsideLine.Type.BOUNDS_ALL);
      fill.setColor(Color.GREEN);
      seriesRenderer.addFillOutsideLine(fill);
    }
    seriesRenderer.setLineWidth(2.5f);
    seriesRenderer.setDisplayChartValues(true);
    seriesRenderer.setChartValuesTextSize(10f);
  }
  return ChartFactory.getCubicLineChartIntent(context, buildBarDataset(titles, values), renderer,
      0.5f);
}
 
开发者ID:ddanny,项目名称:achartengine,代码行数:49,代码来源:SalesComparisonChart.java


示例4: execute

import org.achartengine.renderer.XYSeriesRenderer.FillOutsideLine; //导入依赖的package包/类
/**
 * Executes the chart demo.
 * 
 * @param context the context
 * @return the built intent
 */
public Intent execute(Context context) {
  String[] titles = new String[] { "Sales for 2008", "Sales for 2007",
      "Difference between 2008 and 2007 sales" };
  List<double[]> values = new ArrayList<double[]>();
  values.add(new double[] { 14230, 12300, 14240, 15244, 14900, 12200, 11030, 12000, 12500, 15500,
      14600, 15000 });
  values.add(new double[] { 10230, 10900, 11240, 12540, 13500, 14200, 12530, 11200, 10500, 12500,
      11600, 13500 });
  int length = values.get(0).length;
  double[] diff = new double[length];
  for (int i = 0; i < length; i++) {
    diff[i] = values.get(0)[i] - values.get(1)[i];
  }
  values.add(diff);
  int[] colors = new int[] { Color.BLUE, Color.CYAN, Color.GREEN };
  PointStyle[] styles = new PointStyle[] { PointStyle.POINT, PointStyle.POINT, PointStyle.POINT };
  XYMultipleSeriesRenderer renderer = buildRenderer(colors, styles);
  setChartSettings(renderer, "Monthly sales in the last 2 years", "Month", "Units sold", 0.75,
      12.25, -5000, 19000, Color.GRAY, Color.LTGRAY);
  renderer.setXLabels(12);
  renderer.setYLabels(10);
  renderer.setChartTitleTextSize(20);
  renderer.setTextTypeface("sans_serif", Typeface.BOLD);
  renderer.setLabelsTextSize(14f);
  renderer.setAxisTitleTextSize(15);
  renderer.setLegendTextSize(15);
  length = renderer.getSeriesRendererCount();

  for (int i = 0; i < length; i++) {
    XYSeriesRenderer seriesRenderer = (XYSeriesRenderer) renderer.getSeriesRendererAt(i);
    if (i == length - 1) {
      FillOutsideLine fill = FillOutsideLine.BOUNDS_ALL;
      fill.setColor(Color.GREEN);
      seriesRenderer.addFillOutsideLine(fill);
    }
    seriesRenderer.setLineWidth(2.5f);
    seriesRenderer.setDisplayChartValues(true);
    seriesRenderer.setChartValuesTextSize(10f);
  }
  return ChartFactory.getCubicLineChartIntent(context, buildBarDataset(titles, values), renderer,
      0.5f);
}
 
开发者ID:InQBarna,项目名称:AChartEngine,代码行数:49,代码来源:SalesComparisonChart.java



注:本文中的org.achartengine.renderer.XYSeriesRenderer.FillOutsideLine类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JobConfiguration类代码示例发布时间:2022-05-23
下一篇:
Java LdapUserDetailsImpl类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap