當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。