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

Numbers next to the Chart #101

Open
2AdmiralAdonis2 opened this issue Jan 22, 2020 · 4 comments
Open

Numbers next to the Chart #101

2AdmiralAdonis2 opened this issue Jan 22, 2020 · 4 comments

Comments

@2AdmiralAdonis2
Copy link

Hello,

i got one question.
Is it posible to add the numbers of services and hosts next to the chart?
At the moment i get the number of services when i cross the chart with my mouse.

Thank you very much in advance for your answer!

@mocdaniel
Copy link
Owner

Well, there is always the possibility to add the desired data using the moreInfo attribute of the widgets, either by calling a function from your icinga2.erb or by creating a job or editing the existing jobs in icinga2.rb to add this desired information to your widgets upon creation.

@dnsmichi
Copy link
Collaborator

I haven't found a solution for this yet, since it requires overriding the legend in chartjs with some advanced javascript.

This is the commented function here, where I stopped playing with that: https://github.com/dnsmichi/dashing-icinga2/blob/master/widgets/chartjs/chartjs.coffee#L2

Google points to e.g. https://stackoverflow.com/questions/48476520/show-count-concatenated-to-labels-using-chart-js but I haven't found a way to merge that with the coffeescript layers.

@2AdmiralAdonis2
Copy link
Author

Hi there,

is there something new for this topic?
Or is it not possible?

Thank you in advance for your answer!

@dnsmichi
Copy link
Collaborator

If you have time, please look into the code and try to fix it. I won't have time to do so in the coming months with my new responsibilities. I've switched jobs and am not longer working at Netways/Icinga, I'm with GitLab now.

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

3 participants