Function: useChartData()
useChartData(
options):UseChartDataResult
Hook for fetching chart data in either JSON or Arrow format. Automatically selects the best format based on query hints.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Example
Section titled “Example”// Auto-select formatconst { data, isArrow, loading } = useChartData({ queryKey: "spend_data", parameters: { limit: 1000 }});
// Force Arrow formatconst { data } = useChartData({ queryKey: "big_query", format: "arrow_stream"});