[go: nahoru, domu]

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

Tables with colors #41

Open
matthijscox-asml opened this issue Aug 17, 2023 · 2 comments
Open

Tables with colors #41

matthijscox-asml opened this issue Aug 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@matthijscox-asml
Copy link
Collaborator

Note: this is mostly a brainstorm with myself.

I recently saw many colleagues automatically create tables with colors from scripts.

For example, coloring the background of a table element red or green based the value of a number in the table element. Managers love those kind of quick overviews. And of course change the font color (at least to black or white depending on the background color).

Stuff such as this:

image

There's all these other configurations, like border colors. But let's start with something simple, such as the background color.

Main trouble is how to make this a bit user friendly. My only guess right now would be to make a table/dataframe/matrix object where the elements are not just strings, but TextBox, or TableElement types or something, with lots of properties that you can change. That would give full flexibility per table element at least.

(May have to combine this with easier TextBox/TextBody configuration, font/alignment/etc. Maybe consider to use the same API as Makie.Text?)

(We could also add like a formatter function to the PPTX.Table, to style each element based on the content, see PrettyTables.jl for example. Maybe Term.jl has some good ideas as well.)

@matthijscox-asml matthijscox-asml added the enhancement New feature or request label Aug 17, 2023
@jaakkor2
Copy link
Contributor

What if PrettyTables.jl had an XML backend ..

@matthijscox-asml
Copy link
Collaborator Author

What if PrettyTables.jl had an XML backend ..

Interesting idea :) But actually it would be a PPTX backend, because there is no standard way to define a table in XML.
So I wonder if there would be any benefit to add that code to PrettyTables.jl instead of here.

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