本文整理汇总了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));
}
}
示例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"));
}
}
示例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));
}
}
示例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"));
}
}