score:2
Accepted answer
I have created a demo fiddle to dynamically change y-axis title. Refer this JSFIDDLE
HTML:
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
<input type="button" value="Change Y-axis Title to 'My text'" id="my_btn">
JS (part of thec code to update the y-axis title on a button click):
var chart = $('#container').highcharts();
$('#my_btn').click(function(){
//alert('hey');
chart.yAxis[0].update({
title:{
text:"My text"
}
});
alert('Y-axis title changed to "My text" !');
});
Refer Highcharts 'update' function documentation for further details.
score:0
You have two options:
- use
axis.setTitle()
- good performance, I advice use that solution for setting title - use
axis.update()
- lower performance, because it recreates whole axis, while first method only changes title
Source: stackoverflow.com
Related Articles
- Highcharts: Dynamically (programmatically) assign the axis name
- Highcharts - get visible series name dynamically
- Highcharts - programmatically "flip" (reverse) Y Axis
- Get axis name in tooltip on Highcharts
- HighCharts - Dynamically Change Axis Title Color
- Highcharts X axis categories name gets only shows 1 character
- highcharts - setting step on axis dynamically
- Changing the name for 'categories' of x axis while implementing crossfilter with highcharts
- highcharts x axis categories not updating dynamically vuejs
- Dynamically Change X-axis label name in HighCharts
- Dynamically adjust Y axis min/max based on ajax update and data points in Highcharts
- Can we have same category name in X axis of Highcharts
- How to Show Same Month name of two years in X axis of Highcharts
- Highcharts dynamically assign symbols
- Assign colour to specific data in Highcharts depending on data type dynamically
- Highcharts programmatically add extra text label to y axis
- highcharts with dynamically adding multiple series from JavaScript array name value pair
- Dynamically changing Highcharts Theme through Jquery code not working
- HighCharts Hide Series Name from the Legend
- Hide axis and gridlines Highcharts
- Programmatically change a chart title in highcharts
- Changing data dynamically for a series in Highcharts
- Change HighCharts axis title
- how to set the interval of points on Y - Axis highcharts
- highcharts hide zoom reset button, call zoom reset programmatically
- How replicate the value of Y Axis on both sides of the axis in Highcharts
- Changing series color in highcharts dynamically
- Highcharts Area graph, use 2 fill colors above / below X axis
- SyntaxError: JSON.parse: expected property name or '}' while using highcharts
- Highcharts - How to programmatically toggle legend items and determine which items are selected
- Manually reordering Bar Chart in R Highchart
- Highcharts - Long multi-line y axis labels causing following label to be removed
- how do you call function to pull data automaticall to chart in highcharts
- SCRIPT87: Invalid argument In IE8 Using HighCharts v3.0.5
- highchart drill down break bar chart after change title
- highcharts error -13 while the charts has been rendered
- Convert hours and minute to millisecond using javascript or jQuery
- Highcharts Spider Chart, change axis ranges
- how to set chart in center on full screen view in highchart
- different name series in highchart
- I'm trying to create a timeseries chart having stacked columns in HighCharts
- how to pass to or more list of series to set series
- Add and remove cross datas with highcharts
- HighCharts: Unexpected value NaN parsing y attribute
- dynamically apply timezone offset to a highchart
- Highcharts chart going blank on compare : 'percent' and type: 'arearange'
- highcharts not displaying line when last point is before current x Axis minimum and next point is after current X Axis maximum
- Hide the highcharts tracker from image
- Date type xAxis in Angular Highcharts is still allowing duplicate 'Date' values
- Highmaps drill down map select event