private function useIntersectValue(
        $intersectPropertyName,
        array $legendPropertyNames,
        EnvironmentInterface $environment,
        PaletteInterface $defaultPalette = null
    ) {
        $propertiesDefinition = $environment->getDataDefinition()->getPropertiesDefinition();
        $useIntersectValue    = (bool) $defaultPalette;

        if ($defaultPalette && !$propertiesDefinition->getProperty($intersectPropertyName)->getWidgetType()
        ) {
            $useIntersectValue = true;
        }

        if ($defaultPalette
            && (false === $useIntersectValue)
            && \in_array($intersectPropertyName, $legendPropertyNames)
        ) {
            $useIntersectValue = true;
        }

        return $useIntersectValue;
    }