当前位置: 首页>>代码示例>>Java>>正文


Java ChartType.LINE属性代码示例

本文整理汇总了Java中org.wicketstuff.googlecharts.ChartType.LINE属性的典型用法代码示例。如果您正苦于以下问题:Java ChartType.LINE属性的具体用法?Java ChartType.LINE怎么用?Java ChartType.LINE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.wicketstuff.googlecharts.ChartType的用法示例。


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

示例1: insertLinePlot

private void insertLinePlot(String wicketId, List<Metric> metrics) {
	if ((metrics != null) && (metrics.size() > 0)) {
		IChartData data = WicketUtils.getChartData(metrics);

		ChartProvider provider = new ChartProvider(new Dimension(400, 100), ChartType.LINE,
				data);
		ChartAxis dateAxis = new ChartAxis(ChartAxisType.BOTTOM);
		dateAxis.setLabels(new String[] { metrics.get(0).name,
				metrics.get(metrics.size() / 2).name, metrics.get(metrics.size() - 1).name });
		provider.addAxis(dateAxis);

		ChartAxis commitAxis = new ChartAxis(ChartAxisType.LEFT);
		commitAxis.setLabels(new String[] { "",
				String.valueOf((int) WicketUtils.maxValue(metrics)) });
		provider.addAxis(commitAxis);

		provider.setLineStyles(new LineStyle[] { new LineStyle(2, 4, 0), new LineStyle(0, 4, 1) });
		provider.addShapeMarker(new ShapeMarker(MarkerType.CIRCLE, Color.decode("#002060"), 1, -1, 5));

		add(new Chart(wicketId, provider));
	} else {
		add(WicketUtils.newBlankImage(wicketId));
	}
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:24,代码来源:MetricsPage.java

示例2: insertActivityGraph

private void insertActivityGraph(List<Metric> metrics) {
	if ((metrics != null) && (metrics.size() > 0)
			&& GitBlit.getBoolean(Keys.web.generateActivityGraph, true)) {
		IChartData data = WicketUtils.getChartData(metrics);

		ChartProvider provider = new ChartProvider(new Dimension(290, 100), ChartType.LINE,
				data);
		ChartAxis dateAxis = new ChartAxis(ChartAxisType.BOTTOM);
		dateAxis.setLabels(new String[] { metrics.get(0).name,
				metrics.get(metrics.size() / 2).name, metrics.get(metrics.size() - 1).name });
		provider.addAxis(dateAxis);

		ChartAxis commitAxis = new ChartAxis(ChartAxisType.LEFT);
		commitAxis.setLabels(new String[] { "",
				String.valueOf((int) WicketUtils.maxValue(metrics)) });
		provider.addAxis(commitAxis);
		provider.setLineStyles(new LineStyle[] { new LineStyle(2, 4, 0), new LineStyle(0, 4, 1) });
		provider.addShapeMarker(new ShapeMarker(MarkerType.CIRCLE, Color.decode("#002060"), 1, -1, 5));

		add(new Chart("commitsChart", provider));
	} else {
		add(WicketUtils.newBlankImage("commitsChart"));
	}
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:24,代码来源:SummaryPage.java

示例3: insertLinePlot

private void insertLinePlot(String wicketId, List<Metric> metrics) {
	if ((metrics != null) && (metrics.size() > 0)) {
		IChartData data = WicketUtils.getChartData(metrics);

		ChartProvider provider = new ChartProvider(new Dimension(400, 100), ChartType.LINE,
				data);
		ChartAxis dateAxis = new ChartAxis(ChartAxisType.BOTTOM);
		dateAxis.setLabels(new String[] { metrics.get(0).name,
				metrics.get(metrics.size() / 2).name, metrics.get(metrics.size() - 1).name });
		provider.addAxis(dateAxis);

		ChartAxis commitAxis = new ChartAxis(ChartAxisType.LEFT);
		commitAxis.setLabels(new String[] { "",
				String.valueOf((int) WicketUtils.maxValue(metrics)) });
		provider.addAxis(commitAxis);

		provider.setLineStyles(new LineStyle[] { new LineStyle(2, 4, 0), new LineStyle(0, 4, 1) });
		provider.addShapeMarker(new ShapeMarker(MarkerType.CIRCLE, Color.BLUE, 1, -1, 5));

		add(new Chart(wicketId, provider));
	} else {
		add(WicketUtils.newBlankImage(wicketId));
	}
}
 
开发者ID:BullShark,项目名称:IRCBlit,代码行数:24,代码来源:MetricsPage.java

示例4: insertActivityGraph

private void insertActivityGraph(List<Metric> metrics) {
	if ((metrics != null) && (metrics.size() > 0)
			&& GitBlit.getBoolean(Keys.web.generateActivityGraph, true)) {
		IChartData data = WicketUtils.getChartData(metrics);

		ChartProvider provider = new ChartProvider(new Dimension(290, 100), ChartType.LINE,
				data);
		ChartAxis dateAxis = new ChartAxis(ChartAxisType.BOTTOM);
		dateAxis.setLabels(new String[] { metrics.get(0).name,
				metrics.get(metrics.size() / 2).name, metrics.get(metrics.size() - 1).name });
		provider.addAxis(dateAxis);

		ChartAxis commitAxis = new ChartAxis(ChartAxisType.LEFT);
		commitAxis.setLabels(new String[] { "",
				String.valueOf((int) WicketUtils.maxValue(metrics)) });
		provider.addAxis(commitAxis);
		provider.setLineStyles(new LineStyle[] { new LineStyle(2, 4, 0), new LineStyle(0, 4, 1) });
		provider.addShapeMarker(new ShapeMarker(MarkerType.CIRCLE, Color.BLUE, 1, -1, 5));

		add(new Chart("commitsChart", provider));
	} else {
		add(WicketUtils.newBlankImage("commitsChart"));
	}
}
 
开发者ID:BullShark,项目名称:IRCBlit,代码行数:24,代码来源:SummaryPage.java


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