chart-candy 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -134,7 +134,7 @@ class @ChartCandyLine
|
|
134
134
|
|
135
135
|
|
136
136
|
drawTooltip: () ->
|
137
|
-
@tooltip = @chart.append('svg:g').attr('class', 'tooltip')
|
137
|
+
@tooltip = @chart.append('svg:g').attr('class', 'chart-tooltip')
|
138
138
|
@tooltip.append('svg:rect').attr('rx', 10).attr('ry', 10)
|
139
139
|
@tooltip.append('svg:text').text('')
|
140
140
|
|
@@ -160,7 +160,8 @@ class @ChartCandyLine
|
|
160
160
|
if axis.nature is 'date'
|
161
161
|
@yAxis = d3.time.scale().domain([min, max]).range([@height, 0])
|
162
162
|
else
|
163
|
-
|
163
|
+
max = Math.round(max)
|
164
|
+
upperGap = (Math.round(max / ((@height * 0.95)/@tickSize)))
|
164
165
|
@yAxis = d3.scale.linear().domain([min, max+upperGap]).range([@height, 5])
|
165
166
|
|
166
167
|
@drawAxis side, @yAxis, @width, axis.nature, axis.max_ticks
|
@@ -28,7 +28,7 @@ div.chart-donut{clear:none;float:left;margin-left:30px;width:450px;
|
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
31
|
-
div.tooltip{background-color:#fff;border:1px solid #ddd;border-radius:8;box-shadow:0px 5px 6px -6px #333;color:#000;display:none;height:auto;padding:10px 20px;position:absolute;visibility:visible;width:auto;z-index:100;}
|
31
|
+
div.chart-tooltip{background-color:#fff;border:1px solid #ddd;border-radius:8;box-shadow:0px 5px 6px -6px #333;color:#000;display:none;height:auto;padding:10px 20px;position:absolute;visibility:visible;width:auto;z-index:100;}
|
32
32
|
}
|
33
33
|
}
|
34
34
|
}
|
@@ -18,7 +18,7 @@ div.chart-line{clear:both;float:left;width:100%;
|
|
18
18
|
svg{overflow:visible;height:100%;width:100%;
|
19
19
|
rect.bg{ fill:#fff; }
|
20
20
|
|
21
|
-
g.tooltip{
|
21
|
+
g.chart-tooltip{
|
22
22
|
rect{border-radius:1em;fill:#fff;stroke:#ccc;}
|
23
23
|
text{cursor:default;fill:#555;font-family:'Arial';
|
24
24
|
tspan.x{font-size:1em;fill:#777;}
|
@@ -38,7 +38,11 @@ class ChartCandy::Builder::Donut < ChartCandy::Builder::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def format_money(value)
|
41
|
-
|
41
|
+
if value > 99
|
42
|
+
"#{value.round} $"
|
43
|
+
else
|
44
|
+
sprintf("%0.02f", (value.to_f).round(0)).gsub('.', ',') + ' $'
|
45
|
+
end
|
42
46
|
end
|
43
47
|
|
44
48
|
def hole
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chart-candy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,10 +9,10 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
requirement: &
|
15
|
+
requirement: &2160032960 !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
@@ -21,9 +21,9 @@ dependencies:
|
|
21
21
|
prerelease: false
|
22
22
|
type: :runtime
|
23
23
|
name: spreadsheet
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2160032960
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
|
-
requirement: &
|
26
|
+
requirement: &2160032380 !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - ! '>='
|
29
29
|
- !ruby/object:Gem::Version
|
@@ -32,9 +32,9 @@ dependencies:
|
|
32
32
|
prerelease: false
|
33
33
|
type: :development
|
34
34
|
name: rake
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2160032380
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
-
requirement: &
|
37
|
+
requirement: &2160031840 !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - ! '>='
|
40
40
|
- !ruby/object:Gem::Version
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
prerelease: false
|
44
44
|
type: :development
|
45
45
|
name: rspec
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2160031840
|
47
47
|
description: Chart Candy use D3.js library to quickly render AJAX charts in your Rails
|
48
48
|
project. In a minimum amount of code, you should have a functional chart, styled
|
49
49
|
and good to go.
|
@@ -116,3 +116,4 @@ summary: Chart Candy use D3.js library to quickly render AJAX charts in your Rai
|
|
116
116
|
project. In a minimum amount of code, you should have a functional chart, styled
|
117
117
|
and good to go.
|
118
118
|
test_files: []
|
119
|
+
has_rdoc:
|