Module: ApexCharts::Theme::ClassMethods
- Included in:
- ApexCharts::Theme, Local::LocalClassMethods
- Defined in:
- lib/apexcharts/theme.rb
Instance Method Summary collapse
- #all_palettes ⇒ Object
- #create(palette_name, colors) ⇒ Object
- #custom_palettes ⇒ Object
- #destroy(palette_name) ⇒ Object
- #get_colors(palette_name) ⇒ Object
- #palette_names ⇒ Object
- #palettes ⇒ Object
Instance Method Details
#all_palettes ⇒ Object
29 30 31 |
# File 'lib/apexcharts/theme.rb', line 29 def all_palettes PALETTES + palette_names end |
#create(palette_name, colors) ⇒ Object
13 14 15 |
# File 'lib/apexcharts/theme.rb', line 13 def create(palette_name, colors) palettes[palette_name] = Colors.new colors end |
#custom_palettes ⇒ Object
33 34 35 |
# File 'lib/apexcharts/theme.rb', line 33 def custom_palettes palettes end |
#destroy(palette_name) ⇒ Object
17 18 19 |
# File 'lib/apexcharts/theme.rb', line 17 def destroy(palette_name) palettes.delete palette_name end |
#get_colors(palette_name) ⇒ Object
21 22 23 |
# File 'lib/apexcharts/theme.rb', line 21 def get_colors(palette_name) custom_palettes[palette_name]&.values end |
#palette_names ⇒ Object
25 26 27 |
# File 'lib/apexcharts/theme.rb', line 25 def palette_names custom_palettes.keys end |
#palettes ⇒ Object
37 38 39 |
# File 'lib/apexcharts/theme.rb', line 37 def palettes @custom_palettes end |