Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Support area charts #41

Open
hisham opened this issue Jul 20, 2011 · 0 comments
Open

Support area charts #41

hisham opened this issue Jul 20, 2011 · 0 comments

Comments

@hisham
Copy link

hisham commented Jul 20, 2011

I added support for area charts (similar to google analytics charts where the area under the line graphic is filled in).

Here's my git diff:

--- a/lib/gchart.rb
+++ b/lib/gchart.rb
@@ -380,7 +380,14 @@ class Gchart
end

def set_range_marker(options)

  • orientation = ['vertical', 'Vertical', 'V', 'v', 'R'].include?(options[:orientation]) ? 'R' : 'r'
  • vertical = ['vertical', 'Vertical', 'V', 'v', 'R']
  • horizontal = ['horizontal', 'Horizontal', 'H', 'h', 'r']
  • area = ['area', 'Area', 'A', 'a', 'B']
  • orientation = vertical.include?(options[:orientation]) ? 'R' : options[:orientation]
  • orientation = horizontal.include?(options[:orientation]) ? 'r' : options[:orientation]
  • orientation = area.include?(options[:orientation]) ? 'B' : options[:orientation]
  • orientation = ['R','r','B'].include?(options[:orientation]) ? options[:orientation] : 'r'
    "#{orientation},#{options[:color]},0,#{options[:start_position]},#{options[:stop_position]}#{',1' if options[:overlaid?]}"
    end
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant