{
    "dataRoles": [
        {
            "displayName": "Dates",
            "name": "Dates",
            "kind": "Grouping",
            "displayNameKey": "Role_Dates_DisplayName",
            "description": "Column date",
            "descriptionKey": "Role_Dates_Description"
        },
        {
            "displayNameKey": "Role_StartDate_DisplayName",
            "displayName": "DefaultStartDate",
            "name": "StartDate",
            "kind": "Measure",
            "descriptionKey": "Role_StartDate_Description",
            "description": "You can use measure to assign Default date to the date-picker"
        },
        {
            "displayNameKey": "Role_DefaultEndDate_DisplayName",
            "displayName": "DefaultEndDate",
            "name": "EndDate",
            "kind": "Measure",
            "descriptionKey": "Role_DefaultEndDate_Description",
            "description": "You can use measure to assign Default date to the date-picker"
        }
    ],
    "objects": {
        "datePickers": {
            "displayNameKey": "Obj_DatePickers_DisplayName",
            "displayName": "Date pickers",
            "descriptionKey": "Obj_DatePickers_Description",
            "description": "Settings for period-pickers",
            "properties": {
                "orientationType":{
                    "displayNameKey": "DatePickers_Orientation_DisplayName",
                    "displayName": "Orientation",
                    "descriptionKey": "DatePickers_Orientation_Description",
                    "description": "Set orientation for datePickers",
                    "type": {
                        "enumeration": [
                            {
                                "displayNameKey": "Horizontal",
                                "displayName": "Horizontal",
                                "value": "0"
                            },
                            {
                                "displayNameKey": "Vertical",
                                "displayName": "Vertical",
                                "value": "1"
                            }
                        ]
                    }
                },
                "textSize":{
                    "displayNameKey": "DatePickers_FontSize_DisplayName",
                    "displayName": "Font size",
                    "descriptionKey": "DatePickers_FontSize_Description",
                    "description": "Set font-size for datePickers",
                    "type": {
                        "numeric": true
                    }
                },
                "fontColor":{
                    "displayNameKey": "DatePickers_FontColor_DisplayName",
                    "displayName": "Font color",
                    "descriptionKey": "DatePickers_FontColor_Description",
                    "description": "Set font-color for datePickers",
                    "type": {
                        "fill": {"solid": {"color":true}}
                    }
                },
                "backgroundColor":{
                    "displayNameKey": "DatePickers_BackgroundColor_DisplayName",
                    "displayName": "Background color",
                    "descriptionKey": "DatePickers_BackgroundColor_Description",
                    "description": "Set background-color for datePickers",
                    "type": {
                        "fill": {
                            "solid": {
                                "color":true
                            }
                        }
                    }
                },
                "backgroundTransparency":{
                    "displayNameKey": "DatePickers_BackgroundTransparency_DisplayName",
                    "displayName":"Background transparency",
                    "descriptionKey": "DatePickers_BackgroundTransparency_Description",
                    "description": "Set background-transparency for datePickers",
                    "type": {
                        "numeric": true
                    }
                },
                "borderWidth":{
                    "displayNameKey": "DatePickers_BorderWidth_DisplayName",
                    "displayName":"Border width",
                    "descriptionKey": "DatePickers_BorderWidth_Description",
                    "description": "Set border-width for datePickers",
                    "type": {
                        "numeric": true
                    }
                },
                "borderColor":{
                    "displayNameKey": "DatePickers_BorderColor_DisplayName",
                    "displayName": "Border color",
                    "descriptionKey": "DatePickers_BorderColor_Description",
                    "description": "Set border-color for datePickers",
                    "type": {
                        "fill": {
                            "solid": {
                                "color":true
                            }
                        }
                    }
                },
                "outlineColor":{
                    "displayNameKey": "DatePickers_OutlineColor_DisplayName",
                    "displayName": "Outline color",
                    "descriptionKey": "DatePickers_OutlineColor_Description",
                    "description": "Set outline-color for datePickers",
                    "type": {
                        "fill": {
                            "solid": {
                                "color":true
                            }
                        }
                    }
                }
            }
        },
        "period":{
            "displayNameKey": "Obj_Period_DisplayName",
            "displayName": "Period",
            "descriptionKey": "Obj_Period_Description",
            "description": "Settings for period",
            "properties": {
                "defaultPeriodType": {
                    "displayNameKey": "Period_DefaultPeriodType_DisplayName",
                    "displayName": "Default period",
                    "descriptionKey":"Period_DefaultPeriodType_Description",
                    "description": "Choose how to assign default period to the period-picker",
                    "type": {
                        "enumeration": [
                            {
                                "value": "0",
                                "displayNameKey": "LastMonth",
                                "displayName": "Last month"
                            },
                            {
                                "value": "1",
                                "displayNameKey": "LastEntireMonth",
                                "displayName": "Last entire month"
                            },
                            {
                                "value": "2",
                                "displayNameKey": "LastWeek",
                                "displayName": "Last week"
                            },
                            {
                                "value": "3",
                                "displayNameKey": "LastEntireWeek",
                                "displayName": "Last entire week"
                            },
                            {
                                "value": "4",
                                "displayNameKey": "Custom",
                                "displayName": "Custom(use measures)"
                            }
                        ]
                    },
                    "filterState": true
                },
                "relativeToday": {
                    "type": {
                        "bool": true
                    },
                    "displayNameKey": "Period_RelativeToday_DisplayName",
                    "displayName": "Contain today",
                    "descriptionKey": "Period_RelativeToday_Description",
                    "description": "Effictive when and only when Custom(use measures) not selected",
                    "filterState": true
                },
                "firstDayOfWeek": {
                    "descriptionKey": "Period_FirstDayOfWeek_DisplayName",
                    "displayName": "FirstDayOfWeek",
                    "displayNameKey": "firstDayOfWeek",
                    "type": {
                        "enumeration": [
                            {
                                "value": "0",
                                "displayName": "Sunday",
                                "displayNameKey": "Sunday"
                            },
                            {
                                "value": "1",
                                "displayName": "Monday",
                                "displayNameKey": "Monday"
                            },
                            {
                                "value": "2",
                                "displayName": "Tuesday",
                                "displayNameKey": "Tuesday"
                            },
                            {
                                "value": "3",
                                "displayName": "Wednesday",
                                "displayNameKey": "Wednesday"
                            },
                            {
                                "value": "4",
                                "displayName": "Thursday",
                                "displayNameKey": "Thursday"
                            },
                            {
                                "value": "5",
                                "displayName": "Friday",
                                "displayNameKey": "Friday"
                            },
                            {
                                "value": "6",
                                "displayName": "Saturday",
                                "displayNameKey": "Saturday"
                            }
                        ]
                    },
                    "filterState": true
                }
            }
        },
        "general": {
            "displayName": "General",
            "displayNameKey": "formattingGeneral",
            "properties": {
                "filter": {
                    "type": {
                        "filter": true
                    }
                },
                "selfFilter": {
                    "type": {
                        "filter": {
                            "selfFilter": true
                        }
                    }
                }
            }
        }
    },
    "suppressDefaultTitle": true,
    "dataViewMappings": [
        {
            "conditions": [
                {
                    "Dates": {
                        "max": 1,
                        "min": 1
                    },
                    "StartDate": {
                        "max": 1,
                        "min": 0
                    },
                    "EndDate": {
                        "max": 1,
                        "min": 0
                    }
                }
            ],
            "categorical": {
                "categories": {
                    "for": {
                        "in": "Dates"
                    },
                    "dataReductionAlgorithm": {
                        "top": {
                            "count": 1
                        }
                    }
                },
                "values": {
                    "select": [
                        {
                            "bind": {
                                "to": "StartDate"
                            }
                        },
                        {
                            "bind": {
                                "to": "EndDate"
                            }
                        }
                    ]
                }
            }
        }
    ]
}