1.3.0 • Published 6 months ago

charts-library-adv v1.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Getting started

NPM

Latest Version

Unpkg

How to use

Import it in the html head or with npm i charts-library-adv

Then initialize it after the DOM is loaded

const chart = new Generatechartsadv()

Init

The init method accept only this interface object

Interface

interface ObjAdv {
  result: string
  valueLabels: string[]
  realValues: string[] | number[]
  percValues: string[] | number[]
  type: string
  valueColors: string[]
  labels: string[]
}

Example

const gmb = {
  result: 'ok',
  valueLabels: ['', '', '%', ' days', '%'],
  realValues: [4.7, 61.0, 16.0, 0.01, 80.0],
  percValues: [94, 100, 16, 100, 80],
  type: 'gmb-reviews',
  valueColors: ['green', 'green', 'red', 'green', 'orange'],
  labels: [
    'Satisfaccion',
    'Numero reseñas',
    'Respondidas',
    'Tiempo de respuesta',
    'Global',
  ],
}

In the html code the data-type has to be the same of the type properties inside the object to populate all the fields The loading class is used to view the Skeleon whne the data is not yet retrived.

<div class="chart-card loading" data-type="gmb-reviews">
	...
</div>

Pass this object to the init method

chart.init(gmb)

To init another object pass it into init method

chart.init(advertising)

if you want to reload a chart use the method reload() passing the new object

chart.reload(newGmb)
1.3.0

6 months ago

1.2.8

1 year ago

1.2.12

1 year ago

1.2.13

1 year ago

1.2.10

1 year ago

1.2.11

1 year ago

1.2.16

1 year ago

1.2.17

1 year ago

1.2.14

1 year ago

1.2.15

1 year ago

1.2.18

1 year ago

1.2.19

1 year ago

1.2.20

1 year ago

1.2.9

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago