ankane / react-chartkick

Create beautiful JavaScript charts with one line of React
https://chartkick.com/react
MIT License
1.2k stars 58 forks source link

[Error] No charting library found for GeoChart #49

Closed KRRISH96 closed 4 years ago

KRRISH96 commented 4 years ago

I am using react-charkick for analytics purpose in my project, Thanks for the awesome library. Everything is smooth except for the GeoChart

I am unable to get the GeoChart rendered - I didn't customize anything just imported and rendered with sample data from docs.

Here is an error reproduced codesandbox

import React from "react";
import { GeoChart } from 'react-chartkick'
import 'chart.js'

export default function App() {
  return (
    <div className="App">
      <h1>React Chartkick Geo Chart Error Reproduce</h1>

      <GeoChart data={[["United States", 44], ["Germany", 23], ["Brazil", 22]]} />

    </div>
  );
}

Here is complete stack trace,

callAdapter
https://xfxm1.csb.app/node_modules/chartkick/dist/chartkick.js:1917:13
renderChart
https://xfxm1.csb.app/node_modules/chartkick/dist/chartkick.js:1891:7
GeoChart.__render
https://xfxm1.csb.app/node_modules/chartkick/dist/chartkick.js:2178:5
errorCatcher
https://xfxm1.csb.app/node_modules/chartkick/dist/chartkick.js:1726:13
fetchDataSource
https://xfxm1.csb.app/node_modules/chartkick/dist/chartkick.js:1754:7
GeoChart.Chart
https://xfxm1.csb.app/node_modules/chartkick/dist/chartkick.js:2043:5
new GeoChart
https://xfxm1.csb.app/node_modules/chartkick/dist/chartkick.js:2287:13
ChartComponent.newChartType
https://xfxm1.csb.app/node_modules/react-chartkick/dist/react-chartkick.esm.js:90:22
ChartComponent.componentDidMount
https://xfxm1.csb.app/node_modules/react-chartkick/dist/react-chartkick.esm.js:95:10
commitLifeCycles
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:22101:22
commitLayoutEffects
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:25344:7
HTMLUnknownElement.callCallback
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:336:14
Object.invokeGuardedCallbackDev
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:385:16
invokeGuardedCallback
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:440:31
commitRootImpl
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:25082:9
unstable_runWithPriority
https://xfxm1.csb.app/node_modules/scheduler/cjs/scheduler.development.js:697:12
runWithPriority$2
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:12149:10
commitRoot
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:24922:3
finishSyncRender
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:24329:3
performSyncWorkOnRoot
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:24307:9
scheduleUpdateOnFiber
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:23698:7
updateContainer
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:27103:3
eval
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:27528:7
unbatchedUpdates
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:24433:12
legacyRenderSubtreeIntoContainer
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:27527:5
Object.render
https://xfxm1.csb.app/node_modules/react-dom/cjs/react-dom.development.js:27608:10

Any help would be appreciated!

Thank you!

ankane commented 4 years ago

Hey @KRRISH96, GeoChart requires Google Charts.

KRRISH96 commented 4 years ago

@ankane Ah, thanks for the reply!