本文整理汇总了Java中com.googlecode.gwt.charts.client.options.LegendAlignment类的典型用法代码示例。如果您正苦于以下问题:Java LegendAlignment类的具体用法?Java LegendAlignment怎么用?Java LegendAlignment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LegendAlignment类属于com.googlecode.gwt.charts.client.options包,在下文中一共展示了LegendAlignment类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOptions
import com.googlecode.gwt.charts.client.options.LegendAlignment; //导入依赖的package包/类
private BarChartOptions getOptions() {
// Grid Lines
Gridlines lines = Gridlines.create();
lines.setColor("fff");
// Text Positions X and Y Axis
HAxis hAxis = HAxis.create();
hAxis.setTextPosition(TextPosition.NONE);
VAxis vAxis = VAxis.create();
vAxis.setGridlines(lines);
hAxis.setGridlines(lines);
// Legend
Legend legend = Legend.create();
legend.setPosition(LegendPosition.NONE);
legend.setAligment(LegendAlignment.START);
// Set options
BarChartOptions options = BarChartOptions.create();
options.setHAxis(HAxis.create("Cups"));
options.setVAxis(VAxis.create("Year"));
options.setColors("#2196f3", "#42a5f5", "#64b5f6", "#90caf9");
options.setVAxis(vAxis);
options.setHAxis(hAxis);
options.setLegend(legend);
// Set Animation
Animation animation = Animation.create();
animation.setDuration(500);
animation.setEasing(AnimationEasing.OUT);
options.setAnimation(animation);
// Set Bar
Bar bar = Bar.create();
bar.setGroupWidth("50%");
return options;
}
示例2: getOptions
import com.googlecode.gwt.charts.client.options.LegendAlignment; //导入依赖的package包/类
private AreaChartOptions getOptions() {
//Grid Lines
Gridlines lines = Gridlines.create();
lines.setColor("fff");
// Text Positions X and Y Axis
HAxis hAxis = HAxis.create();
hAxis.setTextPosition(TextPosition.NONE);
VAxis vAxis = VAxis.create();
vAxis.setTextPosition(TextPosition.NONE);
vAxis.setGridlines(lines);
hAxis.setGridlines(lines);
// Legend
Legend legend = Legend.create();
legend.setPosition(LegendPosition.TOP);
legend.setAligment(LegendAlignment.END);
// Set options
AreaChartOptions options = AreaChartOptions.create();
options.setIsStacked(true);
options.setAreaOpacity(1);
options.setVAxis(vAxis);
options.setHAxis(hAxis);
options.setLegend(legend);
options.setColors("2196f3", "42a5f5", "64b5f6", "90caf9", "bbdefb");
ChartArea area = ChartArea.create();
area.setTop(0);
area.setLeft(0);
area.setWidth("100%");
area.setHeight("100%");
options.setChartArea(area);
//Set Animation
Animation animation = Animation.create();
animation.setDuration(500);
animation.setEasing(AnimationEasing.OUT);
options.setAnimation(animation);
return options;
}
示例3: createChartLegend
import com.googlecode.gwt.charts.client.options.LegendAlignment; //导入依赖的package包/类
protected Legend createChartLegend() {
GoogleLegendWrapper legend = GoogleLegendWrapper.create();
legend.setLegendPosition(getLegendPosition());
legend.setAligment(LegendAlignment.CENTER);
return legend;
}