Quick Start
In this tutorial, we will show you how to use VRender to draw a circle. VRender is a simple-to-use, cross-platform, high-performance front-end visualization rendering library.
Get VRender
You can obtain VRender in several ways.
Using NPM Package
First, you need to install VRender in the project root directory using the following command:
Using CDN
You can also get the built VRender file through the CDN. Add the following code to the <head>
tag of the HTML file:
Introducing VRender
Import VRender via NPM Package
Use import
to introduce VRender at the top of the JavaScript file:
Import VRender using the script tag
Introduce the built vchart file directly by adding a <script>
tag in the HTML file:
Drawing a Circle
Before we draw, we can prepare a DOM container with width and height for VRender.
Next, let's create a Stage
instance based on this Canvas, create a circle and add it to the Stage
:
At this point, you have successfully drawn a red circle!
We hope this tutorial helps you learn how to use VChart. Now you can try drawing different types of charts and customize more diverse chart effects by understanding in depth the various configuration options of VChart. Embark on your VChart journey bravely!