{
  "name": "LineChartComparisonDefaultPro",
  "label": "Line Chart Comparison - Default",
  "description": "Line chart overlaying the current period and a comparison period. Pairs with a comparisonPeriod variable and a timeRange variable.",
  "category": "Line Charts",
  "inputs": [
    {
      "name": "dataset",
      "type": "dataset",
      "label": "Dataset",
      "required": true,
      "category": "Component Data"
    },
    {
      "name": "measures",
      "type": "measure",
      "label": "Measures",
      "array": true,
      "config": {
        "dataset": "dataset"
      },
      "required": true,
      "category": "Component Data",
      "inputs": [
        {
          "name": "prefix",
          "type": "string",
          "label": "Prefix"
        },
        {
          "name": "suffix",
          "type": "string",
          "label": "Suffix"
        },
        {
          "name": "displayName",
          "type": "string",
          "label": "Display name"
        },
        {
          "name": "maxCharacters",
          "type": "number",
          "label": "Maximum characters",
          "supportedTypes": [
            "string"
          ]
        },
        {
          "name": "decimalPlaces",
          "type": "number",
          "label": "Decimal places",
          "supportedTypes": [
            "number"
          ]
        },
        {
          "name": "currency",
          "type": "string",
          "label": "Currency",
          "description": "e.g. EUR",
          "supportedTypes": [
            "number"
          ]
        },
        {
          "name": "abbreviateLargeNumber",
          "type": "boolean",
          "label": "Abbreviate large number",
          "supportedTypes": [
            "number"
          ]
        },
        {
          "name": "fillUnderLine",
          "type": "boolean",
          "label": "Fill under line"
        },
        {
          "type": "color",
          "name": "lineColor",
          "label": "Line color",
          "category": "Component Settings"
        },
        {
          "type": "color",
          "name": "previousLineColor",
          "label": "Previous line color",
          "category": "Component Settings"
        },
        {
          "name": "lineDashed",
          "type": "boolean",
          "label": "Primary line dashed",
          "defaultValue": false
        },
        {
          "name": "previousLineDashed",
          "type": "boolean",
          "label": "Compared line dashed",
          "defaultValue": true
        },
        {
          "name": "connectGaps",
          "type": "boolean",
          "label": "Connect gaps",
          "defaultValue": true
        }
      ]
    },
    {
      "name": "xAxis",
      "type": "dimension",
      "label": "X-axis",
      "config": {
        "dataset": "dataset"
      },
      "required": true,
      "category": "Component Data",
      "inputs": [
        {
          "name": "prefix",
          "type": "string",
          "label": "Prefix"
        },
        {
          "name": "suffix",
          "type": "string",
          "label": "Suffix"
        },
        {
          "name": "displayName",
          "type": "string",
          "label": "Display name"
        },
        {
          "name": "maxCharacters",
          "type": "number",
          "label": "Maximum characters",
          "supportedTypes": [
            "string"
          ]
        },
        {
          "name": "decimalPlaces",
          "type": "number",
          "label": "Decimal places",
          "supportedTypes": [
            "number"
          ]
        },
        {
          "name": "currency",
          "type": "string",
          "label": "Currency",
          "description": "e.g. EUR",
          "supportedTypes": [
            "number"
          ]
        },
        {
          "name": "abbreviateLargeNumber",
          "type": "boolean",
          "label": "Abbreviate large number",
          "supportedTypes": [
            "number"
          ]
        },
        {
          "name": "granularity",
          "type": "granularity",
          "label": "Granularity",
          "supportedTypes": [
            "time"
          ],
          "defaultValue": "day"
        },
        {
          "type": "boolean",
          "name": "showGranularityDropdown",
          "label": "Show granularity dropdown",
          "description": "Display a granularity selector inside the chart. The Granularity input above is used only as the default when this option is enabled.",
          "supportedTypes": [
            "time"
          ],
          "defaultValue": false
        },
        {
          "name": "dateBounds",
          "type": "timeRange",
          "label": "Date bounds",
          "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
          "supportedTypes": [
            "time"
          ]
        },
        {
          "type": "boolean",
          "name": "ignoreEmptyDate",
          "label": "Ignore empty dates",
          "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
          "supportedTypes": [
            "time"
          ],
          "defaultValue": false
        }
      ]
    },
    {
      "name": "primaryDateRange",
      "type": "timeRange",
      "label": "Primary date-range",
      "description": "The comparison period is derived internally using this date range — do not also apply a date filter on the underlying dataset",
      "category": "Component Data"
    },
    {
      "name": "comparisonPeriod",
      "type": "comparisonPeriod",
      "label": "Comparison period",
      "category": "Component Data",
      "description": "You can also connect this to a comparison period selector using its variable"
    },
    {
      "name": "timePropertyForNonTimeDimensions",
      "type": "dimension",
      "label": "Time property for non time dimensions",
      "config": {
        "dataset": "dataset",
        "supportedTypes": [
          "time"
        ],
        "hideGranularity": true
      },
      "required": false,
      "category": "Component Data",
      "description": "Choose the time property used for filtering comparison ranges. This will be ignored if your x-axis is already time-based."
    },
    {
      "name": "title",
      "type": "string",
      "label": "Title",
      "category": "Component Header"
    },
    {
      "name": "description",
      "type": "string",
      "label": "Description",
      "category": "Component Header"
    },
    {
      "name": "tooltip",
      "type": "string",
      "label": "Tooltip",
      "category": "Component Header"
    },
    {
      "name": "showLegend",
      "type": "boolean",
      "label": "Show legend",
      "defaultValue": true,
      "category": "Component Settings"
    },
    {
      "name": "showTooltips",
      "type": "boolean",
      "label": "Show tooltips",
      "defaultValue": true,
      "category": "Component Settings"
    },
    {
      "name": "showValueLabels",
      "type": "boolean",
      "label": "Show value labels",
      "defaultValue": true,
      "category": "Component Settings"
    },
    {
      "name": "showLogarithmicScale",
      "type": "boolean",
      "label": "Show logarithmic scale",
      "defaultValue": false,
      "category": "Component Settings"
    },
    {
      "name": "xAxisLabel",
      "type": "string",
      "label": "X-axis Label",
      "category": "Axes Settings"
    },
    {
      "name": "yAxisLabel",
      "type": "string",
      "label": "Y-axis label",
      "category": "Axes Settings"
    },
    {
      "name": "reverseXAxis",
      "type": "boolean",
      "label": "Reverse x-axis",
      "defaultValue": false,
      "category": "Axes Settings"
    },
    {
      "name": "yAxisRangeMin",
      "type": "number",
      "label": "Y-axis range min",
      "category": "Axes Settings"
    },
    {
      "name": "yAxisRangeMax",
      "type": "number",
      "label": "Y-axis range max",
      "category": "Axes Settings"
    },
    {
      "name": "showComparisonAxis",
      "type": "boolean",
      "label": "Display a comparison X-axis",
      "defaultValue": true,
      "category": "Component Settings"
    },
    {
      "name": "maxResults",
      "type": "number",
      "label": "Max results",
      "category": "Component Settings",
      "defaultValue": 1000
    },
    {
      "name": "menuOptions",
      "type": "exportOption",
      "label": "Menu options",
      "array": true,
      "defaultValue": [
        "csv",
        "xlsx",
        "png"
      ],
      "category": "Component Settings"
    }
  ],
  "events": [
    {
      "name": "onLineClicked",
      "label": "A line is clicked",
      "properties": [
        {
          "name": "axisDimensionValue",
          "label": "Clicked axis dimension value",
          "type": "string"
        },
        {
          "name": "axisDimensionTimeRange",
          "label": "Clicked axis dimension time range",
          "type": "timeRange"
        },
        {
          "name": "measureValue",
          "label": "Clicked measure value",
          "type": "number"
        }
      ]
    }
  ]
}