This definitely works for me in this little test case (GWT 2.3, gwt-highcharts 1.1.2) :
~~~~~
::::java
public class HighchartsRescue implements EntryPoint {
public void onModuleLoad() {
final Chart chart = new Chart().setType(Series.Type.SPLINE).setChartTitleText("I can haz cheezeburger").setMarginRight(10);
Hi,
Following the above comment, for making the Y-Axis title dynamic, I change the setAxisTitleText to below code snippet. If you're using jQuery this will work.
FYI, for those that may run across this thread in the future, support to dynamically update the title of an axis post chart render time was added to Highcharts with the 2.2.0 release, and corresponding support was added to GWT Highcharts with the 1.2.0 release. So, you should now be able to dynamically change the text of an axis after the chart has been rendered by simply doing something like the following:
chart.getXAxis().setAxisTitleText("New Title Here");
Or, you can pass a full set of configuration options for more advanced cases like so:
Note that, as far as I know, this new method is currently only supported in Highcharts and not in Highstock, but I'd expect the Highsoft guys will likely promote that new method to a Highstock release in the near future as well.
Hope that new mechanism helps those of you that were looking for this capability!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh hai,
This definitely works for me in this little test case (GWT 2.3, gwt-highcharts 1.1.2) :
~~~~~
::::java
public class HighchartsRescue implements EntryPoint {
public void onModuleLoad() {
final Chart chart = new Chart().setType(Series.Type.SPLINE).setChartTitleText("I can haz cheezeburger").setMarginRight(10);
}
~~~~~~
So either you're not making the getXAxis call before rendering, or your doing something else that's messing with how things work, I dunno.
kthxbai
Hi,
Following the above comment, for making the Y-Axis title dynamic, I change the setAxisTitleText to below code snippet. If you're using jQuery this will work.
Last edit: Nuh 2011-12-29
FYI, for those that may run across this thread in the future, support to dynamically update the title of an axis post chart render time was added to Highcharts with the 2.2.0 release, and corresponding support was added to GWT Highcharts with the 1.2.0 release. So, you should now be able to dynamically change the text of an axis after the chart has been rendered by simply doing something like the following:
Or, you can pass a full set of configuration options for more advanced cases like so:
~~~~~
chart.getXAxis().setAxisTitle(new AxisTitle()
.setText("New Title Here")
.setStyle(new Style()
.setColor("#ff0000")
)
);
~~~~~~
Note that, as far as I know, this new method is currently only supported in Highcharts and not in Highstock, but I'd expect the Highsoft guys will likely promote that new method to a Highstock release in the near future as well.
Hope that new mechanism helps those of you that were looking for this capability!