from typing import Union
from typing import List
from typing import Dict


def values(data: Union[int, float, str, bool, List, Dict[str, float]], **config):
    """
    Constructs a values Field Spec

    :param data: to use to supply values
    :param config: in **kwargs format
    :return: the values spec
    """

    spec = {
        "type": "values",
        "data": data
    }

    if len(config) > 0:
        spec['config'] = config
    return spec