javascript - How to change "defaultOptions" lang in highCharts dynamically -


i have highcharts trying internationalize. set default

defaultoptions ={...     lang: {     loading: 'loading...',     months: ['january', 'february', 'march', 'april', 'may', 'june', 'july',             'august', 'september', 'october', 'november', 'december'], ...} 

i have properties file, , method writes in properties.

methodtowrite['highcharts.months.array']();

but when

lang:{      loading: methodtowrite['highcharts.months.loading']();      months: methodtowrite['highcharts.months.array'](); } 

the chart doesnt show up. have feeling i'm inserting methodtowrite wrong way. methodtowrite works fine , correctly coded. using in other js files.

try changing semi-colons commas. e.g

lang:{  loading: methodtowrite['highcharts.months.loading'](),  months: methodtowrite['highcharts.months.array']() } 

check methodtowrite'highcharts.months.loading' returns string , methodtowrite'highcharts.months.array' returns array.

example: http://jsfiddle.net/8zurx/


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -