Skip to content

Instantly share code, notes, and snippets.

@kevzlou7979
Created January 4, 2018 00:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevzlou7979/3df6a6c1141f858585c46f2818a54817 to your computer and use it in GitHub Desktop.
Save kevzlou7979/3df6a6c1141f858585c46f2818a54817 to your computer and use it in GitHub Desktop.
/*
* #%L
* GwtMaterial
* %%
* Copyright (C) 2015 - 2017 GwtMaterialDesign
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package gwt.material.design.incubator.client.chart.amcharts.js.options;
import com.google.gwt.event.shared.SimpleEventBus;
import gwt.material.design.incubator.client.chart.amcharts.base.HasTrendLineHandlers;
import gwt.material.design.incubator.client.chart.amcharts.events.TrendLineClickEvent;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import java.util.Date;
//@formatter:off
/**
* Creates a trendline for {@link gwt.material.design.incubator.client.chart.amcharts.SerialChart} and
* {@link gwt.material.design.incubator.client.chart.amcharts.XyChart} charts which indicates the trend of your data
* or covers some different purposes. Multiple can be assigned.
*
* @author kevzlou7979@gmail.com
* @see <a href="https://docs.amcharts.com/3/javascriptcharts/TrendLine">Official Documentation</a>
*/
//@formatter:on
@JsType(isNative = true, name = "Object", namespace = JsPackage.GLOBAL)
public class TrendLine extends SimpleEventBus implements HasTrendLineHandlers {
@JsProperty
private String balloonText;
@JsProperty
private int dashLength;
@JsProperty
private String finalCategory;
@JsProperty
private Date finalDate;
@JsProperty
private Image finalImage;
@JsProperty
private int finalValue;
@Override
public void addTrendLineClickHandler(TrendLineClickEvent.TrendLineClickHandler handler) {
addHandler(TrendLineClickEvent.getType(), handler);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment