quotemedia 0.0.1.c → 0.0.1.d
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/quotemedia/chart.rb +22 -23
- data/lib/quotemedia/version.rb +1 -1
- metadata +5 -5
data/lib/quotemedia/chart.rb
CHANGED
@@ -6,7 +6,7 @@ module Quotemedia
|
|
6
6
|
|
7
7
|
# Default styling here that Chris (designer) selected
|
8
8
|
CHART_DEFAULTS = {
|
9
|
-
webmasterId
|
9
|
+
:webmasterId => "500",
|
10
10
|
|
11
11
|
# We don't want a default symbol - each chart should have its own.
|
12
12
|
# symbol: nil, # i.e. ^DOW
|
@@ -16,51 +16,50 @@ module Quotemedia
|
|
16
16
|
# Or it can be left empty, in which case the symbol will be used as the title, unless the title (chton) is off.
|
17
17
|
#chsym: nil,
|
18
18
|
# date range - for example, 1d, 5d, 1y etc.
|
19
|
-
chscale
|
19
|
+
:chscale => '5d',
|
20
20
|
# previous close is on/off
|
21
|
-
chpcon
|
21
|
+
:chpcon => 'on',
|
22
22
|
# Chart type - Options: bar, candle, compare, dot, hlc, line, mountain, ohlc, LineChart, BarChart, CandleStickChart, AreaChart, FinancialLine, FinancialBar, FinancialCandleStick
|
23
|
-
chtype
|
23
|
+
:chtype => 'AreaChart',
|
24
24
|
# The frame around the image canvas on/off
|
25
|
-
chfrmon
|
25
|
+
:chfrmon => 'on',
|
26
26
|
# frame color
|
27
|
-
chfrm
|
27
|
+
:chfrm => 'ffffff',
|
28
28
|
# border around plot area on/off
|
29
|
-
chbdron
|
29
|
+
:chbdron => 'on',
|
30
30
|
# border color around plot area
|
31
|
-
chbdr
|
31
|
+
:chbdr => 'cccccc',
|
32
32
|
# background color
|
33
|
-
chbg
|
33
|
+
:chbg => '', # transparent
|
34
34
|
# background color of chart plot area
|
35
|
-
chbgch
|
35
|
+
:chbgch => '', # transparent
|
36
36
|
# line color
|
37
|
-
chln
|
37
|
+
:chln => '465665',
|
38
38
|
# primary fill color for area charts, and candlestick (and volume bars)
|
39
|
-
chfill
|
39
|
+
:chfill => '1B57AA',
|
40
40
|
# gradient fill color turns on gradient-fill area charts
|
41
|
-
chfill2
|
41
|
+
:chfill2 => 'c0c9d2',
|
42
42
|
# plot area grid on/of
|
43
|
-
chgrdon
|
43
|
+
:chgrdon => 'on',
|
44
44
|
# grid color
|
45
|
-
chgrd
|
45
|
+
:chgrd => 'cccccc',
|
46
46
|
# chart title is visible on/off
|
47
|
-
chton
|
47
|
+
:chton => 'on',
|
48
48
|
# chart title color
|
49
|
-
chtcol
|
49
|
+
:chtcol => '000000',
|
50
50
|
# xy label and tick color
|
51
|
-
chxyc
|
51
|
+
:chxyc => '111111',
|
52
52
|
# previous close line color
|
53
|
-
chpccol
|
53
|
+
:chpccol => 'ee0000',
|
54
54
|
# margin padding
|
55
|
-
chmrg
|
55
|
+
:chmrg => '2',
|
56
56
|
# chart height
|
57
|
-
chhig
|
57
|
+
:chhig => '250',
|
58
58
|
# chart width
|
59
|
-
chwid
|
59
|
+
:chwid => '380',
|
60
60
|
}
|
61
61
|
|
62
62
|
def initialize(params)
|
63
|
-
# TODO: Raise error for parameters that don't exist, i.e. misspelled things
|
64
63
|
unless params[:symbol]
|
65
64
|
raise ArgumentError, "No symbol specified."
|
66
65
|
end
|
data/lib/quotemedia/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quotemedia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.d
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ default_executable:
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
17
|
-
requirement: &
|
17
|
+
requirement: &2157356320 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 0.9.2.2
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2157356320
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rspec
|
28
|
-
requirement: &
|
28
|
+
requirement: &2157355820 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 2.5.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2157355820
|
37
37
|
description: A thin wrapper to Quotemedia apis
|
38
38
|
email:
|
39
39
|
- cowmanifestation@gmail.com
|