pyk 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/pyk/highcharts.rb +10 -0
  2. metadata +2 -2
@@ -69,6 +69,16 @@ class Pyk::Highcharts
69
69
  end
70
70
  end
71
71
 
72
+ # Pyk::Highcharts.funnel(data, series_name, render_to_name, background_color, show_in_legend=false, data_labels=false, text_color="black", neck_width="30%", neck_height="25%")
73
+ def self.funnel(data, series_name, render_to_name, background_color, show_in_legend=false, data_labels=false, text_color="black", neck_width="30%", neck_height="25%")
74
+ LazyHighCharts::HighChart.new('graph') do |f|
75
+ f.chart({type: "funnel" , margin: [0, 0, 0, 0], backgroundColor: background_color, renderTo: render_to_name})
76
+ f.series({name: series_name, data: data})
77
+ f.options[:title][:text] = nil
78
+ f.plotOptions(series: {:dataLabels=>{:enabled=>data_labels, format: '<b>{point.name}</b> ({point.y:,.0f})', color: text_color, softConnector: true}, neckWidth: neck_width, neckHeight: neck_height})
79
+ end
80
+ end
81
+
72
82
  # Pyk::Highcharts.stacked_bar_with_pie(data, categories, pie_data, render_to_name, background_color)
73
83
  def self.stacked_bar_with_pie(data, categories, pie_data, render_to_name, background_color, show_in_legend=false, data_labels=false)
74
84
  LazyHighCharts::HighChart.new('column') do |f|
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 8
9
- version: 0.0.8
8
+ - 9
9
+ version: 0.0.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Pykih Software LLP