{
    "componentChunkName": "component---src-templates-doc-page-jsx",
    "path": "/react-charts/api-download/",
    "result": {"data":{"markdownRemark":{"htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Saving chart images by API call."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"download-api","style":"position:relative;"},"children":[{"type":"text","value":"Download API"},{"type":"element","tagName":"a","properties":{"href":"#download-api","ariaLabel":"download 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":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"We expose the APIs for triggering download via the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"AgChart"}]},{"type":"text","value":" class:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"charts-api/doc-interfaces.AUTO.json","section":"AgChart","names":"[\"download\", \"getImageDataURL\"]","config":"{ \"showSnippets\": false, \"lookupRoot\": \"charts-api\", \"suppressTypes\": [\"AgChartInstance\", \"AgChartOptions\", \"DeepPartial\"] }"},"children":[]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["custom-block","react-only-section"]},"children":[{"type":"element","tagName":"div","properties":{"className":["custom-block-body"]},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"AgChartInstance"}]},{"type":"text","value":" can be obtained using a React "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Ref"}]},{"type":"text","value":" to our "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"<AgChartsReact />"}]},{"type":"text","value":" tag, which\nexposes a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"chart"}]},{"type":"text","value":" property."}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["custom-block","angular-only-section"]},"children":[{"type":"element","tagName":"div","properties":{"className":["custom-block-body"]},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"AgChartInstance"}]},{"type":"text","value":" can be obtained using an Angular "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"@ViewChild"}]},{"type":"text","value":" decorator to reference our "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"AgChartsAngular"}]},{"type":"text","value":" tag, which\nexposes a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"chart"}]},{"type":"text","value":" property."}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["custom-block","vue-only-section"]},"children":[{"type":"element","tagName":"div","properties":{"className":["custom-block-body"]},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"AgChartInstance"}]},{"type":"text","value":" can be obtained using the Vue "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"$refs"}]},{"type":"text","value":" component property to reference our "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"AgChartsVue"}]},{"type":"text","value":" tag, which\nexposes a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"chart"}]},{"type":"text","value":" property."}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":" This example demonstrates:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"How to obtain a reference to an "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"AgChartInstance"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"How to use "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"AgChart.download()"}]},{"type":"text","value":" to start a chart image download."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"How to use "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"AgChart.getImageDataURL()"}]},{"type":"text","value":" to create a base64-encoded image URL, and then open it in\na new tab."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{},"children":[{"type":"text","value":" "},{"type":"element","tagName":"chart-example","properties":{"title":"Download via AgChart API","name":"download","type":"generated"},"children":[]},{"type":"text","value":"\n"}]}],"data":{"quirksMode":false}},"frontmatter":{"title":"Download","version":null,"enterprise":null,"sideMenu":null,"description":null},"headings":[{"id":"download-api","depth":2,"value":"Download API"}]}},"pageContext":{"frameworks":["javascript","react","angular","vue"],"framework":"react","srcPath":"/charts-api-download","pageName":"charts-api-download"}},
    "staticQueryHashes": ["1766026005","699667431","940729948"]}