FM BetterForms
BF Editorfmbetterforms.com
Engineering Reference Docs
Engineering Reference Docs
  • BF Streaming Proxy
  • Updating the Helper File
  • Connection Trouble Shooting Guide
  • Software Testing - Overview
    • Types of Testing
    • UX/UI Checklist
      • Pages
        • Login πŸ”‘
        • Pricing πŸ’΅
        • 404 πŸ€·β€β™‚οΈ
        • Contact Us ☎️
        • Sign Up πŸ‘‹
        • FAQ ❓
        • Blog Post πŸ—ž
        • Careers πŸ’Ό
        • Team πŸ‘«
        • Cart πŸ›’
        • Press πŸ“Έ
        • Search results πŸ”
      • Elements
        • Avatar 😁
        • Badge πŸ“›
        • Button πŸ–²οΈ
        • Card πŸƒ
        • Table πŸ“
        • Icon 🌠
        • Text Field ⌨️
        • Toggle πŸŽ›οΈ
        • Loading ⏳
        • Modal πŸŽ‰
        • Tooltip πŸ› 
        • Search πŸ•΅οΈβ€β™€οΈ
        • Navigation 🧭
        • Radio πŸ“»
        • Checkbox β˜‘οΈ
        • Tabs πŸ—‚
        • Toast 🍞
      • Flows
        • Submitting a form πŸ“¨
        • Making a payment πŸ’³
        • Contacting support πŸ†˜
        • Deleting account πŸ—‘
        • Tracking progress πŸ“ˆ
        • Resetting password 🀫
        • Showing input error 🚨
        • Entering a promo code 🏷️
        • Saving changes πŸ’Ύ
        • Canceling subscription πŸ›‘
      • Topics
        • Responsiveness 🎚
        • Typography πŸ”€
        • Dark mode πŸŒ‘
        • Accessibility 🚹
        • Colors 🎨
        • UX Writing ✏️
      • Brand
        • Logo πŸ’ 
        • Social Media πŸ”‰
        • Typography πŸ” 
    • FM BetterForms - Quality Assurance
    • JavaScript Libraries
  • Rollbacks and Version Control
  • BF Server Proxy
  • Base code End of Life - 0.8.78-0.8111
  • Setting up Auth0
    • Introduction
    • Getting started
      • Creating a tenant
      • Creating Application
      • Additional customizations
        • Allowed Callback URLs
    • Creating a Database
      • Choosing different login options
        • Social Connections
        • Username and password (Auth0)
        • Creating new BF Users
        • Using Auth0 in an iFrame
        • Configuring FM BetterForms
        • Additional Notes
  • Create an S3 Bucket on AWS
  • ApexCharts - Getting started
  • BF Enterprise Documentation
    • Overview
      • Features
      • Overview Diagram
    • Requirements
    • Env File
    • Setting up the Server
      • Installation
      • Loading image to a local repository
      • Starting server
      • Restarting Policies
      • Scaling up
    • Hardware Recommendations
    • FM Credentials - Helper file
    • How it works
      • Development
      • Downloading environment data
  • BetterForms Error Pages API
    • Introduction
    • Dynamic Error Page
    • Static Error Page
    • Custom error pages
    • Custom error handlers
    • Error Code List
  • BF Streaming API
  • Creating a PWA
    • Introduction
    • Getting Started
      • Making it installable
      • Browser Support
      • Sending Push Notifications
      • Sending a Push Notification from the API Endpoint
      • Adding DOM Header Insertion to be Available for Offline Use
Powered by GitBook
On this page
  • Overview
  • Installing and Initializing
  • Example
  • Reference

Was this helpful?

ApexCharts - Getting started

Overview

This doc will explain how to get ApexChart setup to use in an app.

Installing and Initializing

  • Add the following tags to your DOM header insertions:

<!-- Apex chart -->
<script src="<https://cdn.jsdelivr.net/npm/apexcharts>"></script>
<script src="<https://cdn.jsdelivr.net/npm/vue-apexcharts>"></script>
  • Add the following line to a function on the named action β€˜onAppLoad’, under the Global Named Actions (App level):

Vue.component('apexchart', VueApexCharts);

Example

Here is an example of how to draw a chart using ApexCharts in your app.

Sample Data

For this example we will be using these sample data, that can be saved to your Data Model as β€˜data’:

{
	"data": {
        "chartOptions": {
            "chart": {
                "height": 350,
                "stacked": true,
                "toolbar": {
                    "show": true
                },
                "type": "bar",
                "zoom": {
                    "enabled": true
                }
            },
            "fill": {
                "opacity": 1
            },
            "legend": {
                "offsetY": 40,
                "position": "right"
            },
            "plotOptions": {
                "bar": {
                    "horizontal": false
                }
            },
            "responsive": [{
                "breakpoint": 480,
                "options": {
                    "legend": {
                        "offsetX": -10,
                        "offsetY": 0,
                        "position": "bottom"
                    }
                }
            }],
            "xaxis": {
                "categories": ["01/01/2011 GMT", "01/02/2011 GMT", "01/03/2011 GMT", "01/04/2011 GMT", "01/05/2011 GMT", "01/06/2011 GMT"],
                "type": "datetime"
            }
        },
        "series": [{
            "data": [44, 55, 41, 67, 22, 43],
            "name": "PRODUCT A"
        }, {
            "data": [13, 23, 20, 8, 13, 27],
            "name": "PRODUCT B"
        }, {
            "data": [11, 17, 15, 15, 21, 14],
            "name": "PRODUCT C"
        }, {
            "data": [21, 7, 25, 13, 22, 8],
            "name": "PRODUCT D"
        }]
    }
}

Adding charts to page schema

All we need is an html component with the ApexChart tag, as following:

{
    "html": " <div id=\\"chart\\">\\n     <apexchart type=\\"bar\\" height=\\"350\\" :options=\\"model.data.chartOptions\\" :series=\\"model.data.series\\"></apexchart>\\n </div>",
    "styleClasses": "col-md-10",
    "type": "html"
}

The expected result should be as shown in the image below.

Reference

More information can be found on ApexCharts docs

PreviousCreate an S3 Bucket on AWSNextBF Enterprise Documentation

Last updated 10 months ago

Was this helpful?

Installation & Getting Started - ApexCharts.js