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 users to set the color for bar charts #1355

Closed
jleibs opened this issue Feb 17, 2023 · 0 comments · Fixed by #4372
Closed

Allow users to set the color for bar charts #1355

jleibs opened this issue Feb 17, 2023 · 0 comments · Fixed by #4372
Labels
enhancement New feature or request

Comments

@jleibs
Copy link
Member

jleibs commented Feb 17, 2023

The other plotting calls take a color parameter, but log_tensor does not.

I also tried manually setting the color component, but even if we set it, it's not respected.

Two pieces of work here:

  1. A proper API for bar charts that takes a color parameter
  2. Modification to the the bar_chart scene to query the color component and apply it.
@jleibs jleibs added the enhancement New feature or request label Feb 17, 2023
jleibs added a commit that referenced this issue Nov 28, 2023
### What
- Resolves: #1355

```
"""Create and log a bar chart."""

import rerun as rr

rr.init("rerun_example_bar_chart", spawn=True)
rr.log("bar_chart", rr.BarChart([8, 4, 0, 9, 1, 4, 1, 6, 9, 0], color=(255, 0, 0)))
```


![image](https://github.com/rerun-io/rerun/assets/3312232/6af1ad96-0683-401c-ac82-3f7cf0ade57d)


### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [app.rerun.io](https://app.rerun.io/pr/4372) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4372)
- [Docs
preview](https://rerun.io/preview/44d44da7cf0e5ce66a48273fdcd24695bf965331/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/44d44da7cf0e5ce66a48273fdcd24695bf965331/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
teh-cmc pushed a commit that referenced this issue Nov 30, 2023
### What
- Resolves: #1355

```
"""Create and log a bar chart."""

import rerun as rr

rr.init("rerun_example_bar_chart", spawn=True)
rr.log("bar_chart", rr.BarChart([8, 4, 0, 9, 1, 4, 1, 6, 9, 0], color=(255, 0, 0)))
```


![image](https://github.com/rerun-io/rerun/assets/3312232/6af1ad96-0683-401c-ac82-3f7cf0ade57d)


### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [app.rerun.io](https://app.rerun.io/pr/4372) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4372)
- [Docs
preview](https://rerun.io/preview/44d44da7cf0e5ce66a48273fdcd24695bf965331/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/44d44da7cf0e5ce66a48273fdcd24695bf965331/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
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

Successfully merging a pull request may close this issue.

1 participant