Hi Syam, thanks for the plugin. I'm trying to add a candlestick chart an

Hi Syam, thanks for the plugin. I'm trying to add a candlestick chart and was wondering what was the best way to do it. So if you have some tips, I'd appreciate it. I'll start from line chart example and go from there for now.

What would really be awesome is to add a custom chart to which we can jam custom json so that we can try plethora of echarts examples available online. That way all echarts charts are available before official support is added in the plugin.

Thanks.

I have added Candlestick chart to the latest version. I have also changed some of the API methods to make it easier to create your own charts when it is not available in the platform. (However, the better way is to do a pull request and contribute your code back to the add-on so that others will be benefitted from it).

In the latest version, it is easy to create a Candlestick chart if it were not available in the add-on.

```

private static class CandlestickChart extends XYChart {
private final AbstractDataProvider<?> xData;
private final CandlestickData data;

public CandlestickChart(AbstractDataProvider<?> xData, CandlestickData yData) {
    super(ChartType.Line, xData, yData); // Declaring it as a normal line chart
    this.xData = xData;
    this.data = yData;
}

@Override
protected String typeValue() {
    return "candlestick"; // It should be drawn as a candlestick chart, not as a line chart
}

@Override
protected AbstractDataProvider<?> dataToEmbed() {
    return data; // This data should be embedded as the candlestick data
}

@Override
public void validate() throws ChartException {
    super.validate();
    Axis axis = getCoordinateSystem().getAxis(0); // X-axis
    if(axis.getDataType() != DataType.CATEGORY) { // The x-axis should be a category axis
        throw new ChartException("X-axis must be a category axis");
    }
    axis.setData(xData); // Set this as the data for the x-axis
}

}

public record Candlestick(Number opening, Number closing, Number low, Number high) {

@Override
public String toString() {
    return "[" + opening + "," + closing + "," + low + "," + high + "]

";
}
}

public static class CandlestickData extends AbstractData<Candlestick> {

public CandlestickData(Candlestick... data) {
    super(Candlestick.class, data);
}

}


```