package vue-jsoo

  1. Overview
  2. Docs
Binding of Vue_js

Install

Dune Dependency

Authors

Maintainers

Sources

vue-jsoo-0.3.tar.gz
md5=ba1262b631818c3d20eb872b0f6989de
sha512=d326ec29baa9abd5ad0629e3d854b78cb6846714d73b6517fa1f2341f909fe9b4cfd554c113674e133e23e8906d402ab0a3df4210dca1a775ea04c29486cb1cd

doc/src/vue-jsoo.chartjs/vue_chartjs.ml.html

Source file vue_chartjs.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
open Mjs
open Vue_component

type vue_component = any

class type mixins = object
  method reactiveData : any readonly_prop
  method reactiveProp : any readonly_prop
end

class type vue_charts = object
  method _Bar : vue_component readonly_prop
  method _HorizontalBar : vue_component readonly_prop
  method _Doughnut : vue_component readonly_prop
  method _Line : vue_component readonly_prop
  method _Pie : vue_component readonly_prop
  method _PolarArea : vue_component readonly_prop
  method _Radar : vue_component readonly_prop
  method _Bubble : vue_component readonly_prop
  method _Scatter : vue_component readonly_prop
  method mixins : mixins t readonly_prop
  method generateChart : Unsafe.any readonly_prop
end

let vue_charts : vue_charts t optdef = Unsafe.pure_js_expr "VueChartJs"

let make typ id = make
    ~extends:typ
    ~props:(PrsArray ["data"; "options"])
    ~lifecycle:[
      "mounted", (fun this ->
          let this = Unsafe.coerce this in
          this##renderChart this##.data this##.options)]
    id

let make_line () =
  match Optdef.to_option vue_charts with
  | Some v -> make v##._Line "line-chart"
  | None -> log_str "VueChartJs not found"; Unsafe.obj [||]

let make_bar () =
  match Optdef.to_option vue_charts with
  | Some v -> make v##._Bar "bar-chart"
  | None -> log_str "VueChartJs not found"; Unsafe.obj [||]
OCaml

Innovation. Community. Security.