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

Allow bandwidth graph colours to be set by theme #734

Merged
merged 4 commits into from
Feb 27, 2018

Conversation

lantis1008
Copy link
Contributor

@lantis1008 lantis1008 commented Feb 25, 2018

Pulls the "color" attribute of the label for each plot and applies it to the polyline object color and fill attributes

@lantis1008
Copy link
Contributor Author

@d3fz
This may be of interest to the theme you are building.

#plot1_title
{
	color: blue;
}
#plot2_title
{
	color: red;
}
#plot3_title
{
	color: green;
}

@d3fz
Copy link
Contributor

d3fz commented Feb 26, 2018

Nice. 👍

Can you provide any screenshots showing how it looks?

For some reason, it's not working on my end. When setting a different color, only the labels color change. This should also affect graphs color, right?

Clearing browser cache doesn't seem to fix it.

@lantis1008
Copy link
Contributor Author

bccb7114-7803-413c-80f4-e29ee324d943

You took the changes from svg_bandwidth.js as well?
This is a quick change with softer colours

@d3fz
Copy link
Contributor

d3fz commented Feb 27, 2018

This is a quick change with softer colours

Those graph colors look smooth on a dark background. Nice.

You took the changes from svg_bandwidth.js as well?

Yes.

After further testing, console was throwing TypeError: window.parent.getElementById is not a function on line 38 var titleEl = window.parent.getElementById("plot" + x + "_title");

Changing to window.parent.document.getElementById fixed the issue.

Testing random colors

d0aa02b7-9bd2-4e95-b40d-0e80f9c8dfad


Oddly enough, bandwidth_expand.sh header has some duplicate code:

gargoyle_header_footer -m -c "internal.css" -j gargoyle_header_footer -m -c "internal.css"

@lantis1008
Copy link
Contributor Author

Thanks I’ll double check that error. I wasn’t seeing it.
What browser?

@d3fz
Copy link
Contributor

d3fz commented Feb 27, 2018

Vivaldi (Chromium based).

Also tested with latest Chrome/Opera/Edge and Firefox Quantum. Same problem.

@lantis1008
Copy link
Contributor Author

Thanks for pointing it out. Was a typo in the commit, was fine on my router (hence why i saw no bugs). Whoops.

@ericpaulbishop ericpaulbishop merged commit 98ddb86 into ericpaulbishop:master Feb 27, 2018
@ericpaulbishop
Copy link
Owner

Looks great, merged.

@lantis1008
Copy link
Contributor Author

Whoops. Accidentally pushed the theme as well.
I’ll do a commit to enable it for building later this week.

@d3fz
Copy link
Contributor

d3fz commented Feb 27, 2018

I was about to make a comment on that, nice work on the horizontal menu bar by the way. Maybe now it should be possible/easier to address those two remaining themes in #654?

@lantis1008
Copy link
Contributor Author

Definitely. They are next on my todo list :)

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

Successfully merging this pull request may close these issues.

3 participants