def METHOD_NAME(d, path):
    check_allowed_properties(d, path, ("type", "data", "name"))
    check_required_properties(d, path, ("type", "data", "name"))
    check_text(d['name'], path + ".name")
    for i in range(0, len(d['data'])):
        elem = d['data'][i]
        p = "%s.data[%s]" % (path, i)
        check_allowed_properties(elem, p, ("label", "value", "color"))
        check_required_properties(elem, p, ("label", "value", "color"))
        check_text(elem['label'], p + ".label")
        check_number(elem['value'], p + ".value")
        check_color(elem['color'], p + ".color")