本文整理汇总了Java中com.googlecode.wickedcharts.wicket6.highcharts.Chart类的典型用法代码示例。如果您正苦于以下问题:Java Chart类的具体用法?Java Chart怎么用?Java Chart使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Chart类属于com.googlecode.wickedcharts.wicket6.highcharts包,在下文中一共展示了Chart类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: AttributeChartPage
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
public AttributeChartPage() {
super();
// pie chart of percentage of events by event type
this.add(new Chart("eventTypeChart", new EventTypePercentageDiagramm()));
// Create the modal window for attribute chart creation.
this.addChartModal = new AddChartModal("addChartModal", this);
this.add(this.addChartModal);
this.form = new Form<Void>("form");
this.form.add(this.addAddChartButton());
this.add(this.form);
// add attribute charts from database
this.addCharts();
}
开发者ID:bptlab,项目名称:Unicorn,代码行数:19,代码来源:AttributeChartPage.java
示例2: addChart
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
/**
* Forms the chartConfiguration into a chart-Component, that can be
* displayed
*
* @param chartConfiguration
* @return chart-component
*/
private Component addChart(final ChartConfiguration currentOptions) {
try {
switch (currentOptions.getType()) {
case SPLATTER: {
return new Chart("chart", new SplatterChartOptions(currentOptions));
}
case COLUMN: {
return new Chart("chart", new ColumnChartOptions(currentOptions));
}
}
} catch (final Exception e) {
e.printStackTrace();
return new Label("chart", currentOptions.getTitle() + " : This Chart could not be built. Sorry.");
}
return new Label("chart", currentOptions.getTitle() + " : Unsupported Chart type. Sorry.");
}
开发者ID:bptlab,项目名称:Unicorn,代码行数:24,代码来源:AttributeChartPage.java
示例3: respond
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
@Override
protected void respond(final AjaxRequestTarget target) {
Chart chart = (Chart) getComponent();
int seriesIndex = OptionsUtil.getSeriesIndex(chart.getOptions(), this.series.getWickedChartsId());
LiveDataUpdateEvent event = new LiveDataUpdateEvent();
event.setJavascriptChartName(chart.getJavaScriptVarName());
event.setParameters(createJavascriptParameters());
WicketLiveDataUpdateEvent wicketEvent = new WicketLiveDataUpdateEvent(target, event);
final Point point = this.series.update(wicketEvent);
if (point != null) {
JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer();
String jsonPoint = renderer.toJson(point);
String javaScript = "var chartVarName = " + ((Chart) getComponent()).getJavaScriptVarName() + ";\n";
javaScript += "var seriesIndex = " + seriesIndex + ";\n";
javaScript += "eval(chartVarName).series[seriesIndex].addPoint(" + jsonPoint + ", true, true);\n";
target.appendJavaScript(javaScript);
}
}
开发者ID:PkayJava,项目名称:pluggable,代码行数:19,代码来源:LiveDataAjaxBehavior.java
示例4: respond
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
@Override
protected void respond(final AjaxRequestTarget target) {
Chart chart = (Chart) getComponent();
Options options = chart.getOptions();
InteractionEvent event = new InteractionEvent();
event.setJavascriptChartName(chart.getJavaScriptVarName());
StringValue selectedPointValue = getVariableValue(SELECTED_POINT);
if (selectedPointValue != null && !"".equals(selectedPointValue.toString())) {
Integer selectedPoint = selectedPointValue.toInteger();
Point point = OptionsUtil.getPointWithWickedChartsId(options, selectedPoint);
event.setSelectedPoint(point);
}
StringValue selectedSeriesValue = getVariableValue(SELECTED_SERIES);
if (selectedSeriesValue != null && !"".equals(selectedSeriesValue.toString())) {
Integer selectedSeries = selectedSeriesValue.toInteger();
Series<?> series = OptionsUtil.getSeriesWithWickedChartsId(options, selectedSeries);
event.setSelectedSeries(series);
}
event.setSelectedChart(options);
onEvent(event, target);
}
开发者ID:PkayJava,项目名称:pluggable,代码行数:27,代码来源:InteractionBehavior.java
示例5: addViews
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
@SuppressWarnings({"unchecked"})
private void addViews() {
this.listview = new ListView("listview", this.views) {
@Override
protected void populateItem(final ListItem item) {
// prepare and add view
final EventView viewOptions = (EventView) item.getModelObject();
final WebMarkupContainer view = new WebMarkupContainer("view");
try {
// build view
final EventViewOptions options = new EventViewOptions(viewOptions);
view.add(new Chart("view", options));
view.add(new Label("sub", options.getExplanationString()));
} catch (final Exception e) {
e.printStackTrace();
// if chart could not be build, display error message
view.add(new Label("view", "This View could not be built."));
view.add(new Label("sub", "Sorry for the inconvenience"));
}
item.add(view);
// prepare and add removeButton
final AjaxButton removeButton = new AjaxButton("removeViewButton") {
private static final long serialVersionUID = 1L;
@Override
public void onSubmit(final AjaxRequestTarget target, final Form form) {
viewOptions.remove();
EventViewPage.this.views.detach();
target.add(EventViewPage.this.listview.getParent());
}
};
final Form<Void> removeform = new Form<Void>("removeform");
removeform.add(removeButton);
item.add(removeform);
}
};
this.listview.setOutputMarkupId(true);
this.add(this.listview);
}
开发者ID:bptlab,项目名称:Unicorn,代码行数:41,代码来源:EventViewPage.java
示例6: UqasarDataVisualizationWidgetView
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
public UqasarDataVisualizationWidgetView(String id, IModel<Widget> model) {
super(id, model);
UqasarDataVisualizationWidget widget = (UqasarDataVisualizationWidget) model.getObject();
Chart chart = new Chart("chart", widget.getQualityParameterOptions());
add(chart);
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:9,代码来源:UqasarDataVisualizationWidgetView.java
示例7: ProjectQualityChartWidgetView
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
public ProjectQualityChartWidgetView(String id, IModel<Widget> model) {
super(id, model);
ProjectQualityChartWidget widget =
(ProjectQualityChartWidget) model.getObject();
Chart projectCurrentQualityChart = new Chart("currentProjectQualityChart", widget.getOptions());
add(projectCurrentQualityChart);
Chart projectHistoricalQualityChart = new Chart("historicalProjectQualityChart", widget.getOptionsForHistoricalChart());
add(projectHistoricalQualityChart);
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:11,代码来源:ProjectQualityChartWidgetView.java
示例8: TechDebtChartWidgetView
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
public TechDebtChartWidgetView(String id, IModel<Widget> model) {
super(id, model);
TechDebtChartWidget widget =
(TechDebtChartWidget) model.getObject();
Chart techDebtChart = new Chart("techDebtChart", widget.getOptions());
add(techDebtChart);
// TODO: Replace the wicked-chart with this kind of an implementation or with a similar one
// when going open source.
//add(widget.createChart());
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:13,代码来源:TechDebtChartWidgetView.java
示例9: DataDeviationWidgetView
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
public DataDeviationWidgetView(String id, IModel<Widget> model) {
super(id, model);
DataDeviationWidget widget = (DataDeviationWidget) model.getObject();
Chart chart = new Chart("chart", widget.getQualityParameterOptions());
add(chart);
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:9,代码来源:DataDeviationWidgetView.java
示例10: historicChart
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
/**
* @return Returns a graphical representation of all the values,
* thresholds and target value by date
*/
private Chart historicChart(){
Options options = new Options();
options.setTitle(new Title(project.getName()));
List<Number> values = new ArrayList<>();
List<Number> upLimit = new ArrayList<>();
List<Number> lowLimit = new ArrayList<>();
List<String> dates = new ArrayList<>();
// Prepare information to be show in the graphic
for (AbstractHistoricValues h : historicalService.getAllHistValuesForProjectAsc(projectId)) {
values.add(h.getValue());
upLimit.add(h.getUpperAcceptanceLimit());
lowLimit.add(h.getLowerAcceptanceLimit());
dates.add(new SimpleDateFormat("dd.MM.yyyy").format(h.getDate()));
}
// X Axis
Axis xAxis = new Axis();
xAxis.setCategories(dates);
options.setxAxis(xAxis);
// Y Axis
Axis yAxis = new Axis();
options.setyAxis(yAxis);
// Adding series to the graphic
options.addSeries(new SimpleSeries().setName("Value").setData(values));
options.addSeries(new SimpleSeries().setName("UpLimit").setData(upLimit));
options.addSeries(new SimpleSeries().setName("LowLimit").setData(lowLimit));
// Legend
Legend legend = new Legend();
legend.setBorderWidth(0);
options.setLegend(legend);
return new Chart("chart",options);
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:43,代码来源:HistoricProjectPage.java
示例11: onConfigure
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
@Override
protected void onConfigure() {
super.onConfigure();
Theme theme = new Theme();
theme.setLang(DefaultChartOptions.getLocalizedLanguageOptions());
replace(new Chart("chart",
new BaseTrendChartOptions<>(this, model), theme));
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:11,代码来源:BaseTrendChartPanel.java
示例12: onBind
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
@Override
protected void onBind() {
super.onBind();
if (!(getComponent() instanceof Chart)) {
throw new IllegalStateException(LiveDataAjaxBehavior.class.getSimpleName()
+ " can only be bound to components of type " + Chart.class.getSimpleName() + ".");
}
}
开发者ID:PkayJava,项目名称:pluggable,代码行数:9,代码来源:LiveDataAjaxBehavior.java
示例13: buildGui
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
private void buildGui() {
final ValueModel model = getModel();
final ObjectAdapter chartAdapter = model.getObject();
final Object chartObj = chartAdapter.getObject();
WickedChart chart = (WickedChart) chartObj;
Options options = chart.getOptions();
addOrReplace(new Chart("chart", options));
}
开发者ID:isisaddons-legacy,项目名称:isis-wicket-wickedcharts,代码行数:11,代码来源:StandaloneValueAsWickedChart.java
示例14: historicChart
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
/**
* @return Returns a graphical representation of all the values,
* thresholds and target value by date
*/
private Chart historicChart(){
Options options = new Options();
options.setTitle(new Title(baseIndicator.getName()));
List<Number> values = new ArrayList<>();
List<Number> target = new ArrayList<>();
List<Number> upLimit = new ArrayList<>();
List<Number> lowLimit = new ArrayList<>();
List<String> dates = new ArrayList<>();
// Prepare information to be show in the graphic
for (AbstractHistoricValues h : historicalService.getAllHistValuesForBaseIndAsc(baseIndicatorId)) {
values.add(h.getValue());
target.add(h.getTargetValue());
upLimit.add(h.getUpperAcceptanceLimit());
lowLimit.add(h.getLowerAcceptanceLimit());
dates.add(new SimpleDateFormat("dd.MM.yyyy").format(h.getDate()));
}
// X Axis
Axis xAxis = new Axis();
xAxis.setCategories(dates);
options.setxAxis(xAxis);
// Y Axis
Axis yAxis = new Axis();
options.setyAxis(yAxis);
// Adding series to the graphic
options.addSeries(new SimpleSeries().setName("Value").setData(values));
options.addSeries(new SimpleSeries().setName("Target").setData(target));
options.addSeries(new SimpleSeries().setName("UpLimit").setData(upLimit));
options.addSeries(new SimpleSeries().setName("LowLimit").setData(lowLimit));
// Legend
Legend legend = new Legend();
legend.setBorderWidth(0);
options.setLegend(legend);
return new Chart("chart",options);
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:46,代码来源:HistoricBaseIndicatorPage.java
示例15: getIntervalJavaScriptVarName
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
protected String getIntervalJavaScriptVarName() {
Chart chart = (Chart) getComponent();
int seriesIndex = OptionsUtil.getSeriesIndex(chart.getOptions(), this.series.getWickedChartsId());
return getComponent().getMarkupId() + "SeriesInterval" + seriesIndex;
}
开发者ID:PkayJava,项目名称:pluggable,代码行数:6,代码来源:LiveDataAjaxBehavior.java
示例16: SelectionProcessor
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
public SelectionProcessor(final Chart chart) {
this.chart = chart;
}
开发者ID:PkayJava,项目名称:pluggable,代码行数:4,代码来源:SelectionProcessor.java
示例17: InteractionProcessor
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
public InteractionProcessor(final Chart chart) {
this.chart = chart;
}
开发者ID:PkayJava,项目名称:pluggable,代码行数:4,代码来源:InteractionProcessor.java
示例18: HomePage
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
/**
*
* @param parameters wicket params
*/
public HomePage(final PageParameters parameters) {
super(parameters);
final Form form = new Form("form");
final PersonProvider provider = new PersonProvider();
DataView<Person> dataView = new DataView<Person>("person_table", provider) {
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(final Item<Person> item) {
Person person = item.getModelObject();
StringBuilder build = new StringBuilder();
for (Statement statement: person.getStatements()) {
build.append(DATE_FORMAT.format(statement.getDate()));
build.append(": ").append(statement.getAmount()).append(" - ");
}
item.add(new Label("person.id", person.getId()));
item.add(new Label("person.name", person.getName()));
item.add(new Label("person.statements", build.toString()));
}
};
add(dataView);
Options opts = getChartOptions(provider);
final Chart chart = new Chart("chart", opts);
add(chart);
Button button1 = new Button("pop.button") {
public void onSubmit() {
Person newPerson = PersonService.createRandomPerson();
ofy().save().entity(newPerson).now();
chart.setOptions(getChartOptions(provider));
}
};
Behavior fontChangeBehavior = new Behavior() {
@Override
public void onComponentTag(final Component component, final ComponentTag tag) {
super.onComponentTag(component, tag);
tag.put("onmouseover", "this.style.fontStyle='italic'");
tag.put("onmouseout", "this.style.fontStyle='italic'");
}
};
button1.add(fontChangeBehavior);
form.add(button1);
Button button2 = new Button("clear.button") {
public void onSubmit() {
List<Person> persons = ofy().load().type(Person.class).list();
ofy().delete().entities(persons).now();
chart.setOptions(getChartOptions(provider));
}
};
button2.add(fontChangeBehavior);
form.add(button2);
add(form);
// version info for fun
add(new Label("version", getApplication().getFrameworkSettings().getVersion()));
add(new Label("aeversion", SystemProperty.version.get()));
}
开发者ID:tkruse,项目名称:wickapp2,代码行数:68,代码来源:HomePage.java
示例19: ChartBehavior
import com.googlecode.wickedcharts.wicket6.highcharts.Chart; //导入依赖的package包/类
/**
* Constructor.
*
* @param options
* the options for the chart. The {@link Option} class is very
* similar in structure to the Highcharts API reference, see
* http://www.highcharts.com/ref/.
*/
public ChartBehavior(final Chart container) {
this.chart = container;
}
开发者ID:PkayJava,项目名称:pluggable,代码行数:12,代码来源:ChartBehavior.java
注:本文中的com.googlecode.wickedcharts.wicket6.highcharts.Chart类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论