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

background and legend is not affected by theme #65

Open
kfirufk opened this issue Jul 19, 2016 · 0 comments
Open

background and legend is not affected by theme #65

kfirufk opened this issue Jul 19, 2016 · 0 comments

Comments

@kfirufk
Copy link

kfirufk commented Jul 19, 2016

Hi.

I'm using amcharts 3.15.2, with amcharts-angular 1.0.4 and angularjs 1.5.7 with angular material 1.0.9.

when I set a theme or even when I don't set a theme... which defaults to light theme, the background color and legend text color is not set. i checked on google chrome console to see if there is a rule to set the background color and something else overrides it, but nothing!

for now I worked around the issue by connect each graph to the drawn event:

ChatOptionsObj = {
...
listeners: [{
"event": "drawn",
"method": caller.handleGraphsRenderEvent
}],
...
}

and setting the following functions:

     caller.handleGraphsRenderEvent = function (event) {
            caller.setChartsBgColor(event.chart.backgroundColor);
            caller.setChartsLegendColor(event.chart.color);
        }
       caller.setChartsBgColor = function(color) {
            $('div.amchart').css('background-color',color);
        }
        caller.setChartsLegendColor = function (color) {
            $('div.amChartsLegend').find('text').attr('fill',color);
        }

as you can see in the drawn event, i fetch the background color and color properties which are set properly (the event.chart.legend.color is not set properly).

thanks!

@kfirufk kfirufk changed the title themes does not work properly. background color is not affected by theme Jul 19, 2016
@kfirufk kfirufk changed the title background color is not affected by theme background and legend is not affected by theme Jul 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant