@@ -10,6 +10,7 @@ import {
10
10
Group ,
11
11
Paper ,
12
12
Switch ,
13
+ TextInput ,
13
14
Tooltip ,
14
15
} from '@mantine/core' ;
15
16
@@ -958,22 +959,48 @@ export const EditMultiSeriesChartForm = ({
958
959
< Divider
959
960
label = {
960
961
< Group gap = "xs" >
961
- { editedChart . seriesReturnType === 'column' && (
962
- < ColorSwatchInput
963
- value = { series . color }
964
- onChange = { ( color ?: string ) => {
965
- setEditedChart (
966
- produce ( editedChart , draft => {
967
- const draftSeries = draft . series [ i ] ;
968
- if ( draftSeries . type === chartType ) {
969
- draftSeries . color = color ;
970
- }
971
- } ) ,
972
- ) ;
973
- } }
974
- />
962
+ { ( series . type === 'table' || series . type === 'time' ) && (
963
+ < >
964
+ < TextInput
965
+ leftSection = {
966
+ < i className = "bi bi-chat-left-quote-fill fs-8.5" />
967
+ }
968
+ title = "Table header name"
969
+ size = "xs"
970
+ w = { 200 }
971
+ value = { series . displayName }
972
+ onChange = { event => {
973
+ setEditedChart (
974
+ produce ( editedChart , draft => {
975
+ const s = draft . series [ i ] ;
976
+ if ( s . type === 'table' || s . type === 'time' ) {
977
+ s . displayName = event . currentTarget . value ;
978
+ }
979
+ } ) ,
980
+ ) ;
981
+ } }
982
+ placeholder = { `${ series . aggFn } (${ series . field || '' } )` }
983
+ />
984
+ </ >
975
985
) }
976
986
987
+ { editedChart . seriesReturnType === 'column' &&
988
+ chartType === 'time' && (
989
+ < ColorSwatchInput
990
+ value = { series . color }
991
+ onChange = { ( color ?: string ) => {
992
+ setEditedChart (
993
+ produce ( editedChart , draft => {
994
+ const draftSeries = draft . series [ i ] ;
995
+ if ( draftSeries . type === chartType ) {
996
+ draftSeries . color = color ;
997
+ }
998
+ } ) ,
999
+ ) ;
1000
+ } }
1001
+ />
1002
+ ) }
1003
+
977
1004
{ editedChart . series . length > 1 && (
978
1005
< Button
979
1006
variant = "subtle"
0 commit comments