kgabryje commented on code in PR #34017:
URL: https://github.com/apache/superset/pull/34017#discussion_r2194782632
##########
superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/utils.ts:
##########
@@ -16,8 +16,33 @@
* specific language governing permissions and limitations
* under the License.
*/
+import { ControlStateMapping } from '@superset-ui/chart-controls';
+import { QueryFormData } from '@superset-ui/core';
+
+export const COLOR_SCHEME_TYPES = {
+ fixed_color: 'fixed_color',
+ categorical_palette: 'categorical_palette',
+ linear_palette: 'linear_palette',
+ color_breakpoints: 'color_breakpoints',
+} as const;
+
+export type ColorSchemeType =
+ (typeof COLOR_SCHEME_TYPES)[keyof typeof COLOR_SCHEME_TYPES];
+
/* eslint camelcase: 0 */
export function formatSelectOptions(options: (string | number)[]) {
return options.map(opt => [opt, opt.toString()]);
}
+
+export const getSelectedColorSchemeType = (
Review Comment:
Do we need this function? Can't we just call formData.color_scheme_type
directly?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]