JFreechart href action not properly (missing serie and X item) generated with a XY line chart

I've ended up generating a class implementing the XYURLGenerator interface with exactly the same code as StandardXYURLGenerator, with the only difference in the method generateURL, that now returns the data that I needed.

@Override
public String generateURL(XYDataset dataset, int series, int item) {
    String url = this.prefix;
    boolean firstParameter = !url.contains("?");
    url += firstParameter ? "?" : "&";
    url += "series" + "=" + dataset.getSeriesKey(series)
        + "&" + "DrillDown" + "=" + dataset.getXValue(series, item);
        return url;
}