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

split color #2

Closed
chemileon opened this issue Aug 28, 2017 · 3 comments
Closed

split color #2

chemileon opened this issue Aug 28, 2017 · 3 comments
Labels

Comments

@chemileon
Copy link

hey!
i noticed my splits are always red, even when "better" than on my pb. html file source code states td.better as green.. how is td.better defined? i only get green splits when 0 hits, not when less than on pb. how so? how to change it?
thx in advance
chemi

@topeterk
Copy link
Owner

Hi,
sorry that my answer comes quite late.

I guess you are using the "numeric" HTML files...

You can find this expression in the HTML file's javascript code:
(list[i][1] == 0 ? 'better' : 'worse')
Since the goal is getting 0 hits by default, anything thats more is "bad" and gets red.
However, you can try to change this to that expression:
(list[i][1] <= list[i][2] ? 'better' : 'worse')

Hopefully that works for you.

Cheers

PS: Would be nice to give me feedback if that works as you would expect it.

@chemileon
Copy link
Author

hey,
yes, this works! but: obviously this also shows splits that are the same in green (no matter if it is splits with hits or without) because the <= .. if i change that to < only then of course it shows splits with 0/0/0 as red.. man logic is a bitch :D
last time i worked with html and javascript was about 5 years ago.. but i figured it out:
(list[i][1] < list[i][2] || list[i][1] == 0 ? 'better' : 'worse') does the trick!

thx for the help :)

@topeterk
Copy link
Owner

Hey,

glad to hear that I was able to help you.

you're welcome :)

PS: I committed an update of the HTML files today. I would recommend to get them from the sources just to prevent problems when the HTML files are kept open for a longer period of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants