Hello,
I'm using StockChart for GWT and I have some questions, and problems:
First of all, how can I costumize the time buttons? I get always 1m, 3m, 6m, YTD, 1y, ALL. I'd like to set this my way, and i18ed. I saw an example with minutes and seconds, so I guess that's possible.
Second is more of an issue.
If I don't set my tooltip, the navigation, and scroll bar works fine, but if I try to set the tooltip, like this:
Tooltip toolTip = new ToolTip();
toolTip.setFormatter(new ToolTipFormatter() {
@Override
public String format(final ToolTipData toolTipData) {
//method to return the html string
return createToolTipString(toolTipData.getSeriesName(),
toolTipData.getXAsLong(), toolTipData.getYAsLong());
}
};
);
chart.setToolTip(toolTip);
It doesn't get displayed, not event the default one, and whenever I use the scroll, press the right or left buttons, or try to pan the data, the cursor turns to "cursor: e-resize" and wherever I move the mouse, the time frame is affected by it.
Is it an issue? Please, some help would be appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
chart.setRangeSelector(new RangeSelector()
.setOption("buttons", new ChartButton[]{
new ChartButton()
.setType("year")
.setCount(1)
.setText("1y"),
new ChartButton()
.setType("month")
.setCount(6)
.setText("6m"),
new ChartButton()
.setType("month")
.setCount(3)
.setText("3m"),
new ChartButton()
.setType("month")
.setCount(1)
.setText("1m"),
new ChartButton()
.setType("day")
.setCount(1)
.setText("1d")})
and then
public class ChartButton extends Configurable<chartbutton> {</chartbutton>
Hello,
I'm using StockChart for GWT and I have some questions, and problems:
First of all, how can I costumize the time buttons? I get always 1m, 3m, 6m, YTD, 1y, ALL. I'd like to set this my way, and i18ed. I saw an example with minutes and seconds, so I guess that's possible.
Second is more of an issue.
If I don't set my tooltip, the navigation, and scroll bar works fine, but if I try to set the tooltip, like this:
Tooltip toolTip = new ToolTip();
toolTip.setFormatter(new ToolTipFormatter() {
@Override
public String format(final ToolTipData toolTipData) {
//method to return the html string
return createToolTipString(toolTipData.getSeriesName(),
toolTipData.getXAsLong(), toolTipData.getYAsLong());
}
};
);
chart.setToolTip(toolTip);
It doesn't get displayed, not event the default one, and whenever I use the scroll, press the right or left buttons, or try to pan the data, the cursor turns to "cursor: e-resize" and wherever I move the mouse, the time frame is affected by it.
Is it an issue? Please, some help would be appreciated.
for your time buttons here's an example
and then
public class ChartButton extends Configurable<chartbutton> {</chartbutton>
}