[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-25。"],[],[],null,["# Creating a Venn diagram with the Chart Config Editor\n\n| **Note:** Starting in Looker 24.14, the Chart Config Editor supports the creation of Venn diagrams.\n\nA Venn diagram shows the overlap between two or more attributes in a dataset.\n\nUsing the [Chart Config Editor](/looker/docs/chart-config-editor), you can create Venn diagrams by starting from a [column chart](/looker/docs/column-options) in Looker. You must include at least two [`type: yesno` dimensions](/looker/docs/reference/param-dimension-filter-parameter-types#yesno) and one dimension with [`type: string`](/looker/docs/reference/param-dimension-filter-parameter-types#string) or [`type: number`](/looker/docs/reference/param-dimension-filter-parameter-types#number) to create a Venn diagram.\n\nFor example, you can create a Venn diagram that shows the overlap between orders that were a user's first purchase, orders that had a senior discount applied, and orders of $50 or more.\n\nPrerequisites\n-------------\n\nTo access the Chart Config Editor, you must have the [`can_override_vis_config` permission](/looker/docs/admin-panel-users-roles#can_override_vis_config).\n\nWriting the JSON snippet\n------------------------\n\nTo create a Venn diagram, start from the following JSON snippet: \n\n {\n chart: {\n type: 'venn',\n }\n }\n\nCreating a Venn diagram\n-----------------------\n\nTo create a Venn diagram, follow these steps:\n\n1. View a [column chart](/looker/docs/column-options) in an Explore, or edit a column chart in a Look or dashboard.\n\n Start from a column chart with at least three dimensions. Include one dimension of `type: string` or `type: number`.\n Include at least two dimensions of `type: yesno`.\n\n2. In the visualization, open the **Edit** menu.\n\n3. In the **Plot** tab, click the **Edit Chart Config** button. Looker displays the **Edit Chart Config** dialog.\n\n4. Select the **Chart Config (Override)** section, and enter the HighCharts JSON snippet from the [Writing the JSON snippet](#json) section of this page.\n\n5. To let Looker properly format your JSON, click **\\\u003c\\\u003e (Format code)**.\n\n6. To test your changes, click **Preview**.\n\n7. To apply your changes, click **Apply**. The visualization will be displayed using the custom JSON values.\n\nOnce you've customized your visualization, you can save it.\n\n### Adding more conditions\n\nTo add more circles to the Venn diagram, add more `type: yesno` dimensions to the data table. You can [create a custom dimension](/looker/docs/custom-fields#creating_a_custom_dimension_using_a_looker_expression) if you need this condition only for the Venn diagram. Write your custom dimensions as a boolean condition, like in this example: \n\n ${orders.total_amount} \u003e 50\n\n### Changing the overlap label values\n\nBy default, the label for any overlapping regions in the Venn diagram will be a comma-separated concatenation of the region labels. For example, the overlap between the regions \"Spent Over $50\", \"Is First Purchase\", and \"Senior Discount\" would be \"Spent Over $50, Is First Purchase, Senior Discount\".\n\nTo customize these labels, edit the `series.data.name` attributes using the Chart Config Editor. To determine which attribute corresponds to which region, it can be helpful to enumerate all of the regions first.\n\nFor example, consider a Venn diagram with three circles. This means that there are seven regions in total.\n\nYou can use the following JSON snippet to find out which label corresponds to each number: \n\n {\n chart: {\n type: 'venn'\n },\n series: [{\n data: [{ name: '1'}, {name: '2'}, {name: '3'}, {name: '4'}, {name: '5'}, {name: '6'}, {name: '7'}]\n }]\n }\n\nThen, you can edit the `name` attribute for any region whose name you want to change. To let the label remain as default, remove the `name` attribute but leave the brackets intact. In this example, the overlapping regions (3, 5, 6, 7) are relabeled, and the outer circles (1, 2, 4) keep their default label. \n\n {\n chart: {\n type: 'venn'\n },\n series: [{\n data: [{}, {}, {name: 'Ruby tier'}, {}, {name: 'Platinum tier'}, {name: 'Emerald tier'}, {name: 'Sapphire tier'}]\n }]\n }\n\n### Changing the label font size\n\nTo change the font size of the labels on the Venn diagram, edit the `dataLabels.style.fontSize` attributes using the Chart Config Editor.\n\nTo expand on the previous example, the following example sets the font size of each of the labels to 24 point. \n\n {\n chart: {\n type: 'venn',\n\n },\n series: [{\n data: [{\n dataLabels: {\n style: {\n fontSize: 24\n }\n }\n }, {\n dataLabels: {\n style: {\n fontSize: 24\n }\n }\n }, {\n name: 'Ruby tier',\n dataLabels: {\n style: {\n fontSize: 24\n }\n }\n }, {\n dataLabels: {\n style: {\n fontSize: 24\n }\n }\n }, {\n name: 'Platinum tier',\n dataLabels: {\n style: {\n fontSize: 24\n }\n }\n },\n {\n name: 'Emerald tier',\n dataLabels: {\n style: {\n fontSize: 24\n }\n }\n },\n {\n name: 'Sapphire tier',\n dataLabels: {\n style: {\n fontSize: 24\n }\n }\n }\n ]\n }]\n }"]]