Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highstock title fontsize using theme not being applied #2944

Closed
garybrain opened this issue Apr 23, 2014 · 5 comments
Closed

Highstock title fontsize using theme not being applied #2944

garybrain opened this issue Apr 23, 2014 · 5 comments

Comments

@garybrain
Copy link

Hi, I noticed that the Highstock (v4 master) title font-size is not being applied when using a theme.

Following contains a theme, with highchart and highstock charts and the highstock title is not being applied it stays at the default 16px.

http://jsfiddle.net/B6EV7/1/

Browsers :
Chrome 34,9,1847
IE 10
FF 28.0

G.

@ghost
Copy link

ghost commented Apr 23, 2014

This is not isolated to just the fontsize of the title, several other settings of stockcharts are ignored when trying to set them through themes.

http://jsfiddle.net/stephanevanraes/B6EV7/2/

@TorsteinHonsi
Copy link
Collaborator

The problem originates from https://github.com/highslide-software/highcharts.com/blob/highstock-v2.0.0/js/parts/StockChart.js#L73 where a set of options are merged in on chart initialization, thus overriding the default options as set with setOptions.

@TorsteinHonsi
Copy link
Collaborator

Workaround

Instead of using Highcharts.setOptions, merge the theme into the individual chart options: http://jsfiddle.net/highcharts/B6EV7/3/

@qinbx
Copy link

qinbx commented May 8, 2014

I had tried this method nearlly the same as "merge the theme into the individual chart options" is issue #3029 .

Instead of using Highcharts.setOptions, merge the theme into the individual chart options: > http://jsfiddle.net/highcharts/B6EV7/3/

Questions:

  1. If the user config for xAxis or yAxis is Array, above method doesn't work.

  2. As there are hundreds of usage of highstock in my platform, it's a bad method to do extra update after updating the highstock to latest version.

    I'd rather update the highstock.src.js to implement the same thing in Highcharts.StockChart = function (options, callback) { as a global updating, not each usage.

    But i really expect the team can fix this bug in next version.

qinbx added a commit to qinbx/highcharts.com that referenced this issue May 9, 2014
Try to fix highstock can't setdefault option bug.
@ashclarke
Copy link

We use setOptions to set global defaults, and merge in individual options for specific chart changes. Even then it still doesn't work.

@sebastianbochan sebastianbochan self-assigned this Nov 24, 2016
TorsteinHonsi added a commit that referenced this issue Nov 29, 2016
Previous solution broke tests and checked against a hard value. Default values are now added inline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants