[[["易于理解","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-07-30。"],[],[],null,["# Looker visualization components are a suite of React-based components that are available in the open source [`@looker/visualizations` package](https://github.com/looker-open-source/components/tree/main/packages/visualizations).\n\nVisualization components accept a [`Query.client_id` value or a query ID from a Looker Explore](/looker/docs/components-vis-prop-tables) or a [dashboard ID from a Looker dashboard](/looker/docs/components-vis-dashboard-id) and render a client-side visualization without an [iframe](/looker/docs/private-embedding#embedding_a_look).\n\nThese components can be used out of the box, customized, or treated as pure data formatters to pass cleaned data from a Looker Explore to facilitate building your own customized visualizations.\n\nLooker visualization components are designed to be used in a React environment that has been authenticated with Looker's [API](/looker/docs/api-getting-started) using the [TypeScript/JavaScript SDK](https://www.npmjs.com/package/@looker/sdk). That step is handled automatically when you build with the Looker [extension framework](/looker/docs/intro-to-extension-framework).\n\nCreating visualizations with Looker visualization components\n------------------------------------------------------------\n\nLooker's visualization components suite provides two high-level components for working with your data:\n\n- `Query` --- Handles the data fetching and loads the response into [React context](https://reactjs.org/docs/context.html)\n- `Visualization` --- Accepts the data that is returned by `Query` and uses configuration adapters to render the appropriately customized chart on a page\n\nCurrently, data can be rendered as the following chart types:\n\n- Line\n- Area\n- Scatter\n- Sparkline\n- Single value\n- Bar\n- Column\n- Table\n- Pie\n\nMore chart types are in development.\n\nTo view the property tables for each chart type, visit the [Visualization and Query property tables](/looker/docs/components-vis-prop-tables) documentation page.\n\nTo view the available configuration options for each chart type, view the [visualization playground](/looker/docs/components-vis).\n\nWhy use visualization components?\n---------------------------------\n\nVisualization components improve and simplify the process of rendering a visualization from Looker within an application, free up developer time, and give developers more options to customize and extend their visualizations from Looker.\n\n- **Improved embedding** --- Visualization components allow developers to embed a Looker visualization in an application without an iframe. This can improve performance, monitoring, and the ability to customize.\n- **Easy integration** --- Visualization components can then be combined with other components from `@looker/components` to create entirely new compositions and front-end experiences.\n- **Customization** --- It is easier to customize embedded visualizations when using visualization components than when using iframes. Additionally, with visualization components, developers can create highly customized applications much faster, without having to create a visualization layer from scratch.\n- **Simplification** --- Visualization components improve the portability of Looker visualizations and simplify interactions with the Looker API.\n\nInstalling visualization components\n-----------------------------------\n\nTo get started, add the Looker Visualization Components [NPM package](https://www.npmjs.com/package/@looker/visualizations):\n\n- **NPM:** `npm install @looker/visualizations`\n- **YARN:** `yarn add @looker/visualizations`\n\nYou'll also need to satisfy a few peer dependencies --- Looker/components, React, and Styled Components:\n\n- **NPM:** `npm install @looker/components react react-dom styled-components`\n- **YARN:** `yarn add @looker/components react react-dom styled-components`\n\nInformation on installing and using the visualization components package can be found in the README document, available in [GitHub](https://github.com/looker-open-source/components/tree/main/packages/visualizations) and [NPM](https://www.npmjs.com/package/@looker/visualizations).\n\nNext steps\n----------\n\n- [Using visualization components and the `dashboard` property to render a simple visualization](/looker/docs/components-vis-dashboard-id)\n- [Using visualization components to render custom visualizations](/looker/docs/components-vis-render-custom-vis)\n- [Using visualization components to build a custom visualization](/looker/docs/components-vis-custom)\n- [Visualization and Query property tables](/looker/docs/components-vis-prop-tables)"]]