-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chart now supporting empty initialization
- Loading branch information
1 parent
2fb8d60
commit bafe7f2
Showing
3 changed files
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from 'chart.js'; | ||
export * from './chart-parser'; | ||
export * from './chart-types'; | ||
export * from './chart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
import App from './App'; | ||
|
||
// TODO: How can we make the components using this package not care about this file, but keep it here for when we run GeoChart standalone? We don't want to create a chart in a root node when we import this chart package. | ||
|
||
// Fetch the cgpv module | ||
const w = window as any; | ||
const cgpv = w['cgpv']; | ||
const { react, createRoot } = cgpv; | ||
|
||
console.log("geochart index.tsx run"); | ||
|
||
const container = createRoot(document.getElementById("root") as HTMLElement); | ||
container.render( | ||
<react.StrictMode> | ||
<App /> | ||
</react.StrictMode> | ||
); | ||
const root = document.getElementById("root"); | ||
if (root) { | ||
const container = createRoot(document.getElementById("root") as HTMLElement); | ||
container.render( | ||
<react.StrictMode> | ||
<App /> | ||
</react.StrictMode> | ||
); | ||
} |