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

Widget: heat map #265

Open
fgksgf opened this issue Nov 16, 2020 · 3 comments
Open

Widget: heat map #265

fgksgf opened this issue Nov 16, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@fgksgf
Copy link
Contributor

fgksgf commented Nov 16, 2020

Hello, I implemented a heat map widget with termdash in SkyWalking-CLI, like this:
heatmap

I want to contribute it back recently, but I need some time to polish code to make it more general. I think the format of input data should be [['xlabel', 'ylabel', value],...], how about you ?

If you have any advice about the widget, please let me know :)

@mum4k mum4k added the question Further information is requested label Nov 17, 2020
@mum4k
Copy link
Owner

mum4k commented Nov 17, 2020

Hi @fgksgf, that heat map widget looks great! If you are willing to contribute it, this would certainly be a good addition to termdash.

I will be more than happy to help you with design of the API and code cleanup. It is hard for me to answer questions or provide a suggestions without more context though. My suggestion would be to start by sending a PR with the API only. That is just the function definitions and their comments without any implementations. That would help me to understand the proposed structure and would allow us to discuss the widget's design. Here is an example of what I mean by sending just function's definition and comment without implementation:

// Values sets the values to be displayed by the BarChart.
// Each value ends up in its own bar. The values must not be negative and must
// be less or equal the maximum value. A bar displaying the maximum value is a
// full bar, taking all available vertical space.
// Provided options override values set when New() was called.
func (bc *BarChart) Values(values []int, max int, opts ...Option) error {
    return errors.New("not implemented")
}

We could do this for all the functions and options that widget will have and then follow up with a second PR that will contain the implementation. Does this work for you?

@fgksgf
Copy link
Contributor Author

fgksgf commented Nov 17, 2020

No problem, I will do this.
Thanks for your reply.

@mum4k
Copy link
Owner

mum4k commented Nov 17, 2020

Great, thank you for your help!

@mum4k mum4k added enhancement New feature or request and removed question Further information is requested labels Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants