All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.highcharts4gwt.model.highcharts.option.mock.seriescolumnrange.MockData Maven / Gradle / Ivy

There is a newer version: 0.0.7
Show newest version

package com.github.highcharts4gwt.model.highcharts.option.mock.seriescolumnrange;

import com.github.highcharts4gwt.model.highcharts.option.api.seriescolumnrange.Data;
import com.github.highcharts4gwt.model.highcharts.option.api.seriescolumnrange.data.DataClickHandler;
import com.github.highcharts4gwt.model.highcharts.option.api.seriescolumnrange.data.DataMouseOutHandler;
import com.github.highcharts4gwt.model.highcharts.option.api.seriescolumnrange.data.DataMouseOverHandler;
import com.github.highcharts4gwt.model.highcharts.option.api.seriescolumnrange.data.DataRemoveHandler;
import com.github.highcharts4gwt.model.highcharts.option.api.seriescolumnrange.data.DataSelectHandler;
import com.github.highcharts4gwt.model.highcharts.option.api.seriescolumnrange.data.DataUnselectHandler;
import com.github.highcharts4gwt.model.highcharts.option.api.seriescolumnrange.data.DataUpdateHandler;


/**
 * An array of data points for the series. For the columnrange series type, points can be given in the following ways:
 *  
    *
  1. An array of arrays with 3 or 2 values. In this case, the values correspond to x,low,high. If the first value is a string, it is * applied as the name of the point, and the x value is inferred. The x value can also be omitted, in which case the inner arrays should be of length 2. Then the x value is automatically calculated, either starting at 0 and incremented by 1, or from pointStart * and pointInterval given in the series options.

    *
    data: [
     *     [0, 4, 2], 
     *     [1, 2, 1], 
     *     [2, 9, 10]
     * ]
  2. * * *
  3. An array of objects with named values. The objects are * point configuration objects as seen below. If the total number of data points exceeds the series' turboThreshold, this option is not available.

    * *
    data: [{
     *     x: 1,
     *     low: 0,
     *     high: 4,
     *     name: "Point2",
     *     color: "#00FF00"
     * }, {
     *     x: 1,
     *     low: 5,
     *     high: 3,
     *     name: "Point1",
     *     color: "#FF00FF"
     * }]
  4. *
* */ public class MockData implements Data { private String color; private String dataLabels; private String drilldown; private double high; private String id; private double low; private String name; private boolean selected; private double x; private String genericField; private String functionAsString; public String color() { return color; } public MockData color(String color) { this.color = color; return this; } public String dataLabels() { return dataLabels; } public MockData dataLabels(String dataLabelsAsJsonString) { this.dataLabels = dataLabelsAsJsonString; return this; } public String drilldown() { return drilldown; } public MockData drilldown(String drilldown) { this.drilldown = drilldown; return this; } public void addDataClickHandler(DataClickHandler handler) { } public void addDataMouseOutHandler(DataMouseOutHandler handler) { } public void addDataMouseOverHandler(DataMouseOverHandler handler) { } public void addDataRemoveHandler(DataRemoveHandler handler) { } public void addDataSelectHandler(DataSelectHandler handler) { } public void addDataUnselectHandler(DataUnselectHandler handler) { } public void addDataUpdateHandler(DataUpdateHandler handler) { } public double high() { return high; } public MockData high(double high) { this.high = high; return this; } public String id() { return id; } public MockData id(String id) { this.id = id; return this; } public double low() { return low; } public MockData low(double low) { this.low = low; return this; } public String name() { return name; } public MockData name(String name) { this.name = name; return this; } public boolean selected() { return selected; } public MockData selected(boolean selected) { this.selected = selected; return this; } public double x() { return x; } public MockData x(double x) { this.x = x; return this; } public String getFieldAsJsonObject(String fieldName) { return genericField; } public MockData setFieldAsJsonObject(String fieldName, String fieldValueAsJsonObject) { this.genericField = fieldValueAsJsonObject; return this; } public String getFunctionAsString(String fieldName) { return functionAsString; } public MockData setFunctionAsString(String fieldName, String functionAsString) { this.functionAsString = functionAsString; return this; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy