use of com.kyj.fx.voeditor.visual.component.chart.service.BaseGoogleTrendChart in project Gargoyle by callakrsos.
the class GoogleTrendExam method start.
/* (non-Javadoc)
* @see javafx.application.Application#start(javafx.stage.Stage)
*/
@Override
public void start(Stage primaryStage) throws Exception {
URL url = new URL(createUrl());
String jsonString = RequestUtil.requestSSL(url, requestHandler);
// String source = ValueUtil.toString(GoogleTrendExam.class.getResourceAsStream("GoogleTrendSample.json"));
BaseGoogleTrendChart root = new BaseGoogleTrendChart(jsonString, new CategoryAxis(), new NumberAxis(0, 100, 10));
root.setVerticalGridLinesVisible(false);
root.addEventFilter(GoogleTrendChartEvent.GOOGLE_CHART_INTERSECT_NODE_CLICK, ev -> {
System.out.println(ev.getContents());
});
root.addEventHandler(GoogleTrendChartEvent.GOOGLE_CHART_INTERSECT_NODE_CLICK, ev -> {
System.out.println(ev.getContents());
});
primaryStage.setScene(new Scene(root));
primaryStage.show();
}
Aggregations