Skip to content

Commit 7843040

Browse files
formatHeader docs korro and sample
1 parent e103160 commit 7843040

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

docs/StardustDocs/topics/_shadow_resources.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
<resource src="notebook_test_any_3.html"></resource>
180180
<resource src="notebook_test_associate_1.html"></resource>
181181
<resource src="notebook_test_associateBy_1.html"></resource>
182+
<resource src="formatHeader.html"></resource>
182183
<resource src="notebook_test_rename_3.html"></resource>
183184
<resource src="notebook_test_rename_4.html"></resource>
184185
<resource src="notebook_test_rename_5.html"></resource>

docs/StardustDocs/topics/format.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,17 @@ Formats the specified column headers.
149149

150150
<!---FUN formatHeader-->
151151

152+
```kotlin
153+
df
154+
// Format all column headers with bold
155+
.formatHeader().with { bold }
156+
// Format the "name" column (including nested) header with red text
157+
.formatHeader { name }.with { textColor(red) }
158+
// Override "name"/"lastName" column formating header with blue text
159+
.formatHeader { name.lastName }.with { textColor(blue) }
160+
// Format all numeric column headers with underlines
161+
.formatHeader { colsOf<Number?>() }.with { underline }
162+
```
163+
152164
<!---END-->
153165
<inline-frame src="resources/formatHeader.html" width="100%"/>

samples/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ korro {
118118
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/*.kt")
119119
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/*.kt")
120120
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/utils/*.kt")
121+
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/render/*.kt")
121122
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/collectionsInterop/*.kt")
122123
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/column/*.kt")
123124
include("src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/info/*.kt")

0 commit comments

Comments
 (0)