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


Java ChartAxis类代码示例

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


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

示例1: insertLinePlot

import org.wicketstuff.googlecharts.ChartAxis; //导入依赖的package包/类
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,代码行数:25,代码来源:MetricsPage.java

示例2: insertBarPlot

import org.wicketstuff.googlecharts.ChartAxis; //导入依赖的package包/类
private void insertBarPlot(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.BAR_VERTICAL_SET, data);
		ChartAxis dateAxis = new ChartAxis(ChartAxisType.BOTTOM);
		List<String> labels = new ArrayList<String>();
		for (Metric metric : metrics) {
			labels.add(metric.name);
		}
		dateAxis.setLabels(labels.toArray(new String[labels.size()]));
		provider.addAxis(dateAxis);

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

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

示例3: insertActivityGraph

import org.wicketstuff.googlecharts.ChartAxis; //导入依赖的package包/类
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,代码行数:25,代码来源:SummaryPage.java

示例4: insertLinePlot

import org.wicketstuff.googlecharts.ChartAxis; //导入依赖的package包/类
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,代码行数:25,代码来源:MetricsPage.java

示例5: insertActivityGraph

import org.wicketstuff.googlecharts.ChartAxis; //导入依赖的package包/类
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,代码行数:25,代码来源:SummaryPage.java


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