Quick example (direct script inclusion)
Here's a super-quick example of using the rawgraphs from javascript code.
In this case we'll assume that we'll add rawgraphs to our webpage by direct script inclusion. Refer to installation for other options.
See the live demo at the end of the page for a complete example.
#
InstallationWe'll install the core with a <script>
tag:
#
Install some chartsTo do something useful with rawgraphs-core, we'll need some charts as well.
Let's use the charts from the rawgraphs-charts package.
Again, we'll use a <script>
tag in our HTML
In this case the rawgraphs-core api will be available in the raw
object in the global (window) scope,
and the rawgraphs-charts contents will be available in the rawcharts
object.
#
Rendering a bubblechartIn this example we'll build a bubblechart from the @rawgraphs/rawgraphs-core repository. The final html could be the following
#
Live demoHere's a live demo of the code shown above running in codesandbox