apexcharts 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +248 -52
- data/lib/apexcharts.rb +2 -1
- data/lib/apexcharts/charts.rb +11 -18
- data/lib/apexcharts/charts/base.rb +19 -18
- data/lib/apexcharts/charts/bubble.rb +2 -8
- data/lib/apexcharts/charts/cartesian.rb +30 -29
- data/lib/apexcharts/charts/donut.rb +0 -1
- data/lib/apexcharts/charts/features/annotations.rb +16 -17
- data/lib/apexcharts/charts/features/mixable.rb +1 -2
- data/lib/apexcharts/charts/heatmap.rb +2 -4
- data/lib/apexcharts/charts/mixed.rb +42 -32
- data/lib/apexcharts/charts/pie.rb +0 -1
- data/lib/apexcharts/charts/polar.rb +2 -9
- data/lib/apexcharts/charts/radar.rb +2 -4
- data/lib/apexcharts/charts/radial_bar.rb +0 -1
- data/lib/apexcharts/charts/syncing.rb +39 -25
- data/lib/apexcharts/colors.rb +4 -6
- data/lib/apexcharts/config.rb +25 -0
- data/lib/apexcharts/config/default_options.rb +12 -0
- data/lib/apexcharts/helper.rb +151 -87
- data/lib/apexcharts/options/annotations.rb +5 -5
- data/lib/apexcharts/options/axis.rb +12 -12
- data/lib/apexcharts/options/chart.rb +21 -21
- data/lib/apexcharts/options/data_labels.rb +9 -7
- data/lib/apexcharts/options/div_attributes.rb +4 -5
- data/lib/apexcharts/options/fill.rb +7 -7
- data/lib/apexcharts/options/grid.rb +10 -10
- data/lib/apexcharts/options/legend.rb +22 -19
- data/lib/apexcharts/options/markers.rb +13 -13
- data/lib/apexcharts/options/no_data.rb +7 -7
- data/lib/apexcharts/options/plot_options.rb +7 -7
- data/lib/apexcharts/options/root.rb +30 -30
- data/lib/apexcharts/options/states.rb +4 -4
- data/lib/apexcharts/options/stroke.rb +7 -7
- data/lib/apexcharts/options/subtitle.rb +3 -1
- data/lib/apexcharts/options/theme.rb +3 -3
- data/lib/apexcharts/options/title.rb +8 -8
- data/lib/apexcharts/options/tooltip.rb +17 -17
- data/lib/apexcharts/options/x_axis.rb +5 -5
- data/lib/apexcharts/options/y_axis.rb +8 -8
- data/lib/apexcharts/options_builder.rb +49 -60
- data/lib/apexcharts/prefix_with_apex.rb +5 -0
- data/lib/apexcharts/prefixer.rb +19 -0
- data/lib/apexcharts/renderer.rb +64 -17
- data/lib/apexcharts/series.rb +5 -3
- data/lib/apexcharts/series/bubble.rb +33 -22
- data/lib/apexcharts/series/cartesian.rb +63 -49
- data/lib/apexcharts/series/polar.rb +31 -17
- data/lib/apexcharts/support/rails.rb +1 -1
- data/lib/apexcharts/support/sinatra.rb +9 -0
- data/lib/apexcharts/theme.rb +5 -6
- data/lib/apexcharts/utils.rb +1 -0
- data/lib/apexcharts/utils/copy.rb +9 -0
- data/lib/apexcharts/utils/date_time.rb +50 -44
- data/lib/apexcharts/utils/hash.rb +2 -3
- data/lib/apexcharts/version.rb +1 -1
- data/vendor/assets/javascripts/apexcharts.js +2 -2
- metadata +27 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54ad80f2d5b534d005e140000f3accfb846be669b5ead95ba608a7bf98b31561
|
4
|
+
data.tar.gz: 5f26699fcd55813b799a5834ffae901a12f25fd768aadb814599715bd030afaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f9bb66bf223bbc14f2b00789968324940488a860abdaa8a4128dc416b60110da4fcf9148d16845ca86c02c9835b3abb73d5071d38075eab2890f6f4d21aec48
|
7
|
+
data.tar.gz: ce976c0c8a8ac057f92ef0680cdfd3e5ab79af6b2d00f52d482704efc1146dbcb3bad8a0fcc330d89fa97d9618442dc6f78361b570e71835fbc9df96be43d445
|
data/README.md
CHANGED
@@ -1,23 +1,55 @@
|
|
1
1
|
<p align="center">
|
2
|
-
<img src="images/placeholder.png" height="
|
2
|
+
<img src="images/placeholder.png" height="80">
|
3
3
|
</p>
|
4
4
|
|
5
5
|
<p align="center">
|
6
|
-
<a href="https://rubygems.org/gems/apexcharts"
|
7
|
-
|
8
|
-
|
6
|
+
<a href="https://rubygems.org/gems/apexcharts">
|
7
|
+
<img src="https://img.shields.io/gem/v/apexcharts.svg?label=apexcharts" alt="Gem Version" />
|
8
|
+
</a>
|
9
|
+
<a href="https://travis-ci.org/styd/apexcharts.rb">
|
10
|
+
<img src="https://travis-ci.org/styd/apexcharts.rb.svg?branch=master" alt="Build Status" />
|
11
|
+
</a>
|
12
|
+
<a href="https://rubygems.org/gems/apexcharts">
|
13
|
+
<img alt="Downloads" src="https://img.shields.io/gem/dt/apexcharts">
|
14
|
+
</a>
|
9
15
|
<img src="https://img.shields.io/github/commit-activity/m/styd/apexcharts.rb.svg?label=commits" alt="Commits" />
|
10
|
-
<a href="https://github.com/styd/apexcharts.rb/blob/master/LICENSE"
|
11
|
-
|
12
|
-
|
16
|
+
<a href="https://github.com/styd/apexcharts.rb/blob/master/LICENSE">
|
17
|
+
<img src="https://img.shields.io/badge/License-MIT-brightgreen.svg" alt="License">
|
18
|
+
</a>
|
19
|
+
<a href="https://codeclimate.com/github/styd/apexcharts.rb/maintainability">
|
20
|
+
<img src="https://api.codeclimate.com/v1/badges/07a4f59e67abfeae21cb/maintainability" />
|
21
|
+
</a>
|
22
|
+
<a href='https://coveralls.io/github/styd/apexcharts.rb?branch=master'>
|
23
|
+
<img src='https://coveralls.io/repos/github/styd/apexcharts.rb/badge.svg?branch=master' alt='Coverage Status' />
|
24
|
+
</a>
|
25
|
+
<a href='http://clayallsopp.github.io/readme-score/?url=styd/apexcharts.rb'>
|
26
|
+
<img src='http://readme-score-api.herokuapp.com/score.svg?url=styd/apexcharts.rb' alt='README Score' />
|
27
|
+
</a>
|
13
28
|
</p>
|
14
29
|
|
15
30
|
|
16
|
-
##
|
31
|
+
## About
|
17
32
|
|
18
|
-
ApexCharts.RB is a ruby
|
19
|
-
[ApexCharts.JS]
|
20
|
-
|
33
|
+
> ApexCharts.RB is a ruby charting library that's going to give your ruby app beautiful,
|
34
|
+
> interactive, and responsive charts powered by [ApexCharts.JS]. On top of those sweet
|
35
|
+
> advantages, you'll also get extra features that you can't get by just including ApexCharts.JS
|
36
|
+
> to your ruby app, namely **view/template helpers for creating charts**, **options shortcuts**,
|
37
|
+
> **application wide default options**, **reusable custom theme palette**, and so on.
|
38
|
+
|
39
|
+
|
40
|
+
## Trusted By
|
41
|
+
|
42
|
+
<img src="images/users/ventrata.png" title="Use case: ticket sales for clients (visitor attractions and tour operators)" width="180" height="40" />
|
43
|
+
|
44
|
+
> If your organization/company uses ApexCharts.RB in production, please comment on
|
45
|
+
> [this issue](https://github.com/styd/apexcharts.rb/issues/34).
|
46
|
+
|
47
|
+
|
48
|
+
## Supported By
|
49
|
+
|
50
|
+
<a href="https://www.jetbrains.com/?from=ApexCharts.RB">
|
51
|
+
<img src="images/supporters/jetbrains.svg" title="Grants 1 License for All Products Pack (worth US$649.00/year)" width="120" height="120" />
|
52
|
+
</a>
|
21
53
|
|
22
54
|
|
23
55
|
## README Versions
|
@@ -25,15 +57,15 @@ beautiful, interactive, and responsive charts for your ruby app.
|
|
25
57
|
This README might not be for the version you use.
|
26
58
|
Choose the right README:
|
27
59
|
|
28
|
-
|
29
|
-
- [v0.1.5](https://github.com/styd/apexcharts.rb/blob/v0.1.5/README.md)
|
30
|
-
- [v0.1.4](https://github.com/styd/apexcharts.rb/blob/v0.1.4/README.md)
|
31
|
-
- [v0.1.3](https://github.com/styd/apexcharts.rb/blob/v0.1.3/README.md)
|
32
|
-
- [v0.1.2](https://github.com/styd/apexcharts.rb/blob/v0.1.2/README.md)
|
33
|
-
- [v0.1.1](https://github.com/styd/apexcharts.rb/blob/v0.1.1/README.md)
|
60
|
+
> [v0.1.7] | [v0.1.6] | [v0.1.5] | [v0.1.4] | [v0.1.3] | [v0.1.2] | [v0.1.1]
|
34
61
|
|
35
62
|
## Table of Contents
|
36
63
|
|
64
|
+
- [About](#about)
|
65
|
+
- [Trusted By](#trusted-by)
|
66
|
+
- [Supported By](#supported-by)
|
67
|
+
- [README Versions](#readme-versions)
|
68
|
+
- [Table of Contents](#table-of-contents)
|
37
69
|
- [Usage](#usage)
|
38
70
|
- [Cartesian Charts](#cartesian-charts)
|
39
71
|
- [Line Chart](#line-chart)
|
@@ -64,12 +96,19 @@ Choose the right README:
|
|
64
96
|
- [Polar Charts](#polar-charts-1)
|
65
97
|
- [Options](#options)
|
66
98
|
- [Global Options](#global-options)
|
67
|
-
- [
|
99
|
+
- [Formatter Function](#formatter-function)
|
68
100
|
- [Reusable Custom Palette](#reusable-custom-palette)
|
69
101
|
- [Global Palette](#global-palette)
|
70
102
|
- [Local Palette](#local-palette)
|
103
|
+
- [Use Alongside Other Charting Libraries](#use-alongside-other-charting-libraries)
|
104
|
+
- [Alongside Chartkick](#alongside-chartkick)
|
105
|
+
- [Chartkick (Chart.js) and ApexCharts](#chartkick-chartjs-and-apexcharts)
|
106
|
+
- [Chartkick (Google Charts) and ApexCharts](#chartkick-google-charts-and-apexcharts)
|
107
|
+
- [Chartkick (Highcharts) and ApexCharts](#chartkick-highcharts-and-apexcharts)
|
108
|
+
- [Installation](#installation)
|
71
109
|
- [Web Support](#web-support)
|
72
110
|
- [Rails](#rails)
|
111
|
+
- [Sinatra](#sinatra)
|
73
112
|
- [Plain HTML+ERB (Without Framework)](#plain-htmlerb-without-framework)
|
74
113
|
- [Roadmap](#roadmap)
|
75
114
|
- [Contributing](#contributing)
|
@@ -265,7 +304,8 @@ you can do this:
|
|
265
304
|
|
266
305
|
#### Syncing Charts
|
267
306
|
|
268
|
-
You can synchronize charts by using `syncing_charts` or `synchronized_charts` methods. For
|
307
|
+
You can synchronize charts by using `syncing_charts` or `synchronized_charts` methods. For
|
308
|
+
example:
|
269
309
|
```erb
|
270
310
|
<%= syncing_charts(chart: {toolbar: false}, height: 250, style: 'display: inline-block; width: 32%;') do %>
|
271
311
|
<% mixed_charts(theme: 'palette4', data_labels: false) do %>
|
@@ -513,10 +553,29 @@ just any single value of type Numeric.
|
|
513
553
|
|
514
554
|
## Options
|
515
555
|
|
516
|
-
ApexCharts.RB supports [all options from
|
556
|
+
ApexCharts.RB supports [all options from ApexCharts.JS](https://apexcharts.com/docs/options/),
|
557
|
+
but instead of *camelCase*, you can write them in *snake_case*.
|
558
|
+
|
559
|
+
ApexCharts.RB also provides shortcuts to some ApexCharts.JS options, such as `title`. In
|
560
|
+
ApexCharts.JS you would have to write
|
561
|
+
|
562
|
+
```ruby
|
563
|
+
title: { text: "Some title" }
|
564
|
+
```
|
565
|
+
In ApexCharts.RB you can write
|
566
|
+
```ruby
|
567
|
+
title: "Some title"
|
568
|
+
```
|
569
|
+
if you just want to add the text.
|
517
570
|
|
518
|
-
|
519
|
-
|
571
|
+
`xtitle` and `ytitle` are even greater shortcuts. Instead of
|
572
|
+
```ruby
|
573
|
+
xaxis: { title: { text: "x title" } }
|
574
|
+
```
|
575
|
+
you can write
|
576
|
+
```ruby
|
577
|
+
xtitle: "x title"
|
578
|
+
```
|
520
579
|
|
521
580
|
```ruby
|
522
581
|
options = {
|
@@ -540,35 +599,30 @@ These options can be passed to any chart helper like `<%= line_chart(series, opt
|
|
540
599
|
|
541
600
|
### Global Options
|
542
601
|
|
543
|
-
To
|
602
|
+
To use default options globally, you can specify config for default options before calling
|
603
|
+
your charts. In Rails, put it in `initializers` directory. For example:
|
544
604
|
|
545
|
-
```
|
546
|
-
|
605
|
+
```ruby
|
606
|
+
# config/initializers/apexcharts.rb
|
547
607
|
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
…
|
608
|
+
ApexCharts.config.default_options = {
|
609
|
+
data_labels: false,
|
610
|
+
tootip: true,
|
611
|
+
theme: 'my-theme'
|
553
612
|
}
|
554
|
-
|
555
|
-
Object.assign(Apex, apexGlobalOptions)
|
556
613
|
```
|
557
614
|
|
558
|
-
All charts will then
|
615
|
+
All charts will then automatically pick up these global options, which can be overwritten
|
616
|
+
individually by any options passed to the relevant chart helper.
|
559
617
|
|
618
|
+
### Formatter Function
|
560
619
|
|
561
|
-
|
562
|
-
|
620
|
+
To use a _simple_ formatter function (e.g. formatter in `tooltip`, `data_labels`, and `labels`),
|
621
|
+
you can add [functionable-json](https://github.com/styd/functionable-json) to your Gemfile and
|
622
|
+
use it like so:
|
563
623
|
|
564
|
-
```
|
565
|
-
|
566
|
-
gem 'apexcharts'
|
567
|
-
```
|
568
|
-
|
569
|
-
And then execute:
|
570
|
-
```bash
|
571
|
-
$ bundle
|
624
|
+
```erb
|
625
|
+
<%= area_chart series, tooltip: {y: {formatter: function(val) { return '$' + parseFloat(val).toLocaleString() }}} %>
|
572
626
|
```
|
573
627
|
|
574
628
|
|
@@ -624,11 +678,112 @@ destroy_palette "ephemeral"
|
|
624
678
|
on the same page or in its partials. Otherwise, nothing will happen.
|
625
679
|
|
626
680
|
|
681
|
+
## Use Alongside Other Charting Libraries
|
682
|
+
|
683
|
+
You can prefix the helper methods name with your chosen words to avoid name clashing with
|
684
|
+
other charting libraries (e.g. chartkick, google_charts, etc.) you already use. Just set
|
685
|
+
the `APEXCHARTS_PREFIX` environment variable to a string before you start your app server,
|
686
|
+
say, 'awesome\_' and then on your views/templates use the chart helpers as `awesome_line_chart`,
|
687
|
+
`awesome_area_chart`, and so on. `create_palette` and `destroy_palette` are left as is (not
|
688
|
+
prefixed) as other libraries don't seem to have anything similar to them.
|
689
|
+
|
690
|
+
Besides setting the environtment variable, if you just want a quick prefix, you can instead
|
691
|
+
do this on your _Gemfile_:
|
692
|
+
|
693
|
+
```ruby
|
694
|
+
gem 'apexcharts', require: 'apexcharts/prefix_with_apex'
|
695
|
+
```
|
696
|
+
|
697
|
+
and you'll get `apex_line_chart`, `apex_area_chart`, etc.
|
698
|
+
|
699
|
+
The prefix you set only applies to the outer chart helpers. The inner chart helpers is not
|
700
|
+
prefixed. For example:
|
701
|
+
|
702
|
+
```erb
|
703
|
+
<%= awesome_syncing_chart(syncing_options) do %>
|
704
|
+
<% combo_chart(mixed_options) do %>
|
705
|
+
<% line_chart(line_series) %>
|
706
|
+
<% area_chart(area_series) %>
|
707
|
+
<% end %>
|
708
|
+
<% end %>
|
709
|
+
```
|
710
|
+
|
711
|
+
### Alongside Chartkick
|
712
|
+
|
713
|
+
Given:
|
714
|
+
|
715
|
+
```erb
|
716
|
+
<% series = [
|
717
|
+
{name: 'Verified', data: @verified_users},
|
718
|
+
{name: 'Unverified', data: @unverified_users}
|
719
|
+
] %>
|
720
|
+
<% options = {
|
721
|
+
legend: 'bottom', title: 'Users Grouped By Week For The Last 1 Year',
|
722
|
+
ytitle: 'Users', width: '100%', height: '300px'
|
723
|
+
} %>
|
724
|
+
```
|
725
|
+
|
726
|
+
#### Chartkick (Chart.js) and ApexCharts
|
727
|
+
|
728
|
+
```erb
|
729
|
+
<div style="display: inline-block; width: 48%;">
|
730
|
+
<%= area_chart(series, {**options, adapter: 'chartjs'}) %>
|
731
|
+
</div>
|
732
|
+
<div style="display: inline-block; width: 48%;">
|
733
|
+
<%= apex_area_chart(series, options) %>
|
734
|
+
</div>
|
735
|
+
```
|
736
|
+
|
737
|
+

|
738
|
+
|
739
|
+
#### Chartkick (Google Charts) and ApexCharts
|
740
|
+
|
741
|
+
```erb
|
742
|
+
<div style="display: inline-block; width: 48%;">
|
743
|
+
<%= area_chart(series, {**options, adapter: 'google'}) %>
|
744
|
+
</div>
|
745
|
+
|
746
|
+
<div style="display: inline-block; width: 48%;">
|
747
|
+
<%= apex_area_chart(series, options) %>
|
748
|
+
</div>
|
749
|
+
```
|
750
|
+
|
751
|
+

|
752
|
+
|
753
|
+
#### Chartkick (Highcharts) and ApexCharts
|
754
|
+
|
755
|
+
```erb
|
756
|
+
<div style="display: inline-block; width: 48%;">
|
757
|
+
<%= area_chart(series, {**options, adapter: 'highcharts'}) %>
|
758
|
+
</div>
|
759
|
+
|
760
|
+
<div style="display: inline-block; width: 48%;">
|
761
|
+
<%= apex_area_chart(series, options) %>
|
762
|
+
</div>
|
763
|
+
```
|
764
|
+
|
765
|
+

|
766
|
+
|
767
|
+
|
768
|
+
## Installation
|
769
|
+
Add this line to your application's Gemfile:
|
770
|
+
|
771
|
+
```ruby
|
772
|
+
gem 'groupdate' # optional
|
773
|
+
gem 'apexcharts'
|
774
|
+
```
|
775
|
+
|
776
|
+
And then execute:
|
777
|
+
```bash
|
778
|
+
$ bundle
|
779
|
+
```
|
780
|
+
|
781
|
+
|
627
782
|
## Web Support
|
628
783
|
|
629
784
|
### Rails
|
630
785
|
|
631
|
-
|
786
|
+
Require it in your `app/assets/javascripts/application.js`.
|
632
787
|
```js
|
633
788
|
//= require apexcharts
|
634
789
|
```
|
@@ -642,20 +797,48 @@ and then require it in your `app/javascript/packs/application.js`.
|
|
642
797
|
require("apexcharts")
|
643
798
|
```
|
644
799
|
|
800
|
+
### Sinatra
|
801
|
+
|
802
|
+
Require it after you `require 'sinatra/base'` and add helper `Sinatra::ApexCharts` in the
|
803
|
+
class that inherits from `Sinatra::Base`.
|
804
|
+
|
805
|
+
```ruby
|
806
|
+
require 'sinatra/base'
|
807
|
+
require 'apexcharts'
|
808
|
+
|
809
|
+
class SimpleApp < Sinatra::Base
|
810
|
+
helpers Sinatra::ApexCharts
|
811
|
+
end
|
812
|
+
```
|
813
|
+
|
814
|
+
To add the asset (ApexCharts.JS), include a script tag in your template
|
815
|
+
as follows:
|
816
|
+
|
817
|
+
```ruby
|
818
|
+
template :index do
|
819
|
+
<<~INDEX
|
820
|
+
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
|
821
|
+
<% series = {...} %>
|
822
|
+
<%= pie_chart(series, legend: "left") %>
|
823
|
+
INDEX
|
824
|
+
end
|
825
|
+
```
|
826
|
+
|
827
|
+
For more details, [see example](examples/sinatra/sample.rb).
|
828
|
+
|
829
|
+
|
645
830
|
### Plain HTML+ERB (Without Framework)
|
646
831
|
|
647
|
-
|
832
|
+
Insert this to the top of your .html.erb files:
|
648
833
|
|
649
|
-
```
|
834
|
+
```erb
|
650
835
|
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
|
651
|
-
<% require 'set' %>
|
652
836
|
<% require 'apexcharts' %>
|
653
837
|
<% include ApexCharts::Helper %>
|
654
838
|
```
|
655
|
-
`require 'set'` is needed because of an issue in the dependency used, but not needed
|
656
|
-
in v0.2.x release of ApexCharts.RB.
|
657
839
|
|
658
840
|
You can then generate the static html page with e.g.
|
841
|
+
|
659
842
|
```bash
|
660
843
|
$ erb sample.html.erb > sample.html
|
661
844
|
```
|
@@ -663,7 +846,7 @@ $ erb sample.html.erb > sample.html
|
|
663
846
|
|
664
847
|
## Roadmap
|
665
848
|
|
666
|
-
- Support other ruby frameworks (
|
849
|
+
- Support other ruby frameworks (hanami, roda, cuba, middleman, etc.)
|
667
850
|
- v0.1.x
|
668
851
|
- Add more features (e.g. gradient line, background image, etc.)
|
669
852
|
- v0.2.x
|
@@ -684,13 +867,26 @@ Everyone is encouraged to help improve this project by:
|
|
684
867
|
|
685
868
|
## License
|
686
869
|
|
687
|
-
The gem is available as open source under the terms of the
|
870
|
+
The gem is available as open source under the terms of the
|
871
|
+
[MIT License](https://opensource.org/licenses/MIT).
|
688
872
|
|
689
873
|
|
690
874
|
## Like the charts?
|
691
875
|
|
692
|
-
Consider donating to the author of ApexCharts.JS to support his awesome library.
|
876
|
+
Consider donating to the author of [ApexCharts.JS] to support his awesome library.
|
693
877
|
This project wouldn't be possible without it.
|
694
878
|
|
695
879
|
Become a sponsor on [Patreon](https://patreon.com/junedchhipa).
|
696
880
|
One time donation on [PayPal](https://paypal.me/junedchhipa)
|
881
|
+
|
882
|
+
|
883
|
+
[ApexCharts.JS]: https://github.com/apexcharts/apexcharts.js
|
884
|
+
|
885
|
+
|
886
|
+
[v0.1.7]: https://github.com/styd/apexcharts.rb/blob/v0.1.7/README.md
|
887
|
+
[v0.1.6]: https://github.com/styd/apexcharts.rb/blob/v0.1.6/README.md
|
888
|
+
[v0.1.5]: https://github.com/styd/apexcharts.rb/blob/v0.1.5/README.md
|
889
|
+
[v0.1.4]: https://github.com/styd/apexcharts.rb/blob/v0.1.4/README.md
|
890
|
+
[v0.1.3]: https://github.com/styd/apexcharts.rb/blob/v0.1.3/README.md
|
891
|
+
[v0.1.2]: https://github.com/styd/apexcharts.rb/blob/v0.1.2/README.md
|
892
|
+
[v0.1.1]: https://github.com/styd/apexcharts.rb/blob/v0.1.1/README.md
|
data/lib/apexcharts.rb
CHANGED
data/lib/apexcharts/charts.rb
CHANGED
@@ -1,20 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
require_relative 'charts/radar'
|
15
|
-
require_relative 'charts/mixed'
|
16
|
-
require_relative 'charts/syncing'
|
17
|
-
require_relative 'charts/polar'
|
18
|
-
require_relative 'charts/pie'
|
19
|
-
require_relative 'charts/donut'
|
20
|
-
require_relative 'charts/radial_bar'
|
3
|
+
module ApexCharts
|
4
|
+
%w(
|
5
|
+
base cartesian line area bar column scatter candlestick
|
6
|
+
heatmap bubble radar mixed syncing polar pie donut
|
7
|
+
).each do |type|
|
8
|
+
autoload :"#{type.capitalize}Chart", "apexcharts/charts/#{type}.rb"
|
9
|
+
end
|
10
|
+
|
11
|
+
autoload :RangeBarChart, 'apexcharts/charts/range_bar.rb'
|
12
|
+
autoload :RadialBarChart, 'apexcharts/charts/radial_bar.rb'
|
13
|
+
end
|