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

HTML formatting for a column affects other columns with same name #982

Open
Jolanrensen opened this issue Dec 3, 2024 · 1 comment
Open
Labels
bug Something isn't working
Milestone

Comments

@Jolanrensen
Copy link
Collaborator

Given the following example

val df = dataFrameOf("firstName", "lastName", "age", "city", "weight", "isHappy")(
    "Alice", "Cooper", 15, "London", 54, true,
    "Bob", "Dylan", 45, "Dubai", 87, true,
    "Charlie", "Daniels", 20, "Moscow", null, false,
    "Charlie", "Chaplin", 40, "Milan", null, true,
    "Bob", "Marley", 30, "Tokyo", 68, true,
    "Alice", "Wolf", 20, null, 55, false,
    "Charlie", "Byrd", 30, "Moscow", 90, true,
).group("firstName", "lastName").into("name")
    .groupBy("city").toDataFrame()
    .add("cityCopy") { "city"<String>() }
    .group("city").into("cityGroup")
    .rename("cityCopy").into("city")

// affects city, cityGroup.city, and group[*].city
df.format("city").with {
    bold and italic and textColor(green)
}.toStandaloneHTML().openInBrowser()

We'd expect only city to be affected by the format operation, but cityGroup.city and all city columns inside group are also affected.

image

@Jolanrensen Jolanrensen added the bug Something isn't working label Dec 3, 2024
@Jolanrensen Jolanrensen added this to the 0.15.0 milestone Dec 3, 2024
@Jolanrensen
Copy link
Collaborator Author

Jolanrensen commented Dec 3, 2024

image

It also seems that frame columns and column groups are excluded? I'd expect the group column to get black backgrounds as well in this example.

@Jolanrensen Jolanrensen mentioned this issue Dec 4, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant