import React from 'react'; import { IField } from '../../interfaces'; import { ColorDisplay } from './encodings'; const MAX_COLORS = 15; export default function ColorPanel(props: { display: ColorDisplay; field: IField; aggerated?: boolean }) { const { display, field, aggerated } = props; const fieldName = aggerated && field.analyticType === 'measure' && field.aggName ? `${field.aggName}(${field.name})` : field.name; return (