{
    "componentChunkName": "component---src-templates-doc-page-jsx",
    "path": "/javascript-data-grid/integrated-charts-api-pivot-chart/",
    "result": {"data":{"markdownRemark":{"htmlAst":{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This section shows how Pivot Charts can be created via the Grid API."}]},{"type":"element","tagName":"h2","properties":{"id":"creating-pivot-charts","style":"position:relative;"},"children":[{"type":"text","value":"Creating Pivot Charts"},{"type":"element","tagName":"a","properties":{"href":"#creating-pivot-charts","ariaLabel":"creating pivot charts permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Pivot Charts can be created through "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"gridApi.createPivotChart()"}]},{"type":"text","value":" as shown below:"}]},{"type":"element","tagName":"snippet","properties":{},"children":[{"type":"text","value":"\n| gridOptions.api.createPivotChart({\n|     chartType: 'groupedColumn',\n|     // other options...\n| });\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The snippet above creates a Pivot Chart with the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"groupedColumn"}]},{"type":"text","value":" chart type. For a full list of options see "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/integrated-charts-api-pivot-chart/#pivot-chart-api"},"children":[{"type":"text","value":"Pivot Chart API"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The following example demonstrates how Pivot Charts can be created programmatically via "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"gridApi.createPivotChart()"}]},{"type":"text","value":":  "}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Pivot Chart","name":"pivot-chart-api","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"menu\", \"rowgrouping\", \"charts\"], \"exampleHeight\": 900, \"myGridReference\": 1 }"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"pivot-chart-api","style":"position:relative;"},"children":[{"type":"text","value":"Pivot Chart API"},{"type":"element","tagName":"a","properties":{"href":"#pivot-chart-api","ariaLabel":"pivot chart api permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Pivot Charts can be created programmatically using:"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"grid-api/api.json","section":"charts","names":"[\"createPivotChart\"]"},"children":[]}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"interface-documentation","properties":{"interfacename":"CreatePivotChartParams","overridesrc":"integrated-charts-api-pivot-chart/resources/chart-api.json"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The API returns a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ChartRef"}]},{"type":"text","value":" object when a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"chartContainer"}]},{"type":"text","value":" is provided. This is the same structure\nthat is provided to the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"createChartContainer(chartRef)"}]},{"type":"text","value":" callback. The "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ChartRef"}]},{"type":"text","value":" provides the application\nwith the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"destroyChart()"}]},{"type":"text","value":" method that is required when the application wants to dispose the chart."}]},{"type":"element","tagName":"h2","properties":{"id":"next-up","style":"position:relative;"},"children":[{"type":"text","value":"Next Up"},{"type":"element","tagName":"a","properties":{"href":"#next-up","ariaLabel":"next up permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Continue to the next section to learn about: "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/integrated-charts-api-cross-filter-chart/"},"children":[{"type":"text","value":"Cross Filter API"}]},{"type":"text","value":"."}]}]},"frontmatter":{"title":"Pivot Chart API","version":null,"enterprise":true,"sideMenu":null,"description":null},"headings":[{"id":"creating-pivot-charts","depth":2,"value":"Creating Pivot Charts"},{"id":"pivot-chart-api","depth":2,"value":"Pivot Chart API"},{"id":"next-up","depth":2,"value":"Next Up"}]}},"pageContext":{"frameworks":["javascript","react","angular","vue"],"framework":"javascript","srcPath":"/integrated-charts-api-pivot-chart","pageName":"integrated-charts-api-pivot-chart"}},
    "staticQueryHashes": ["1766026005","699667431","940729948"]}