nvd3-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/.gitmodules +3 -0
  2. data/README.md +101 -0
  3. data/lib/nvd3-rails.rb +1 -0
  4. data/lib/nvd3/rails.rb +8 -0
  5. data/lib/nvd3/rails/engine.rb +6 -0
  6. data/lib/nvd3/rails/version.rb +5 -0
  7. data/nvd3-rails.gemspec +21 -0
  8. data/vendor/assets/javascripts/nvd3-rails.js +7 -0
  9. data/vendor/assets/javascripts/nvd3/.git.sample/HEAD +1 -0
  10. data/vendor/assets/javascripts/nvd3/.git.sample/config +13 -0
  11. data/vendor/assets/javascripts/nvd3/.git.sample/description +1 -0
  12. data/vendor/assets/javascripts/nvd3/.git.sample/hooks/applypatch-msg.sample +15 -0
  13. data/vendor/assets/javascripts/nvd3/.git.sample/hooks/commit-msg.sample +24 -0
  14. data/vendor/assets/javascripts/nvd3/.git.sample/hooks/post-update.sample +8 -0
  15. data/vendor/assets/javascripts/nvd3/.git.sample/hooks/pre-applypatch.sample +14 -0
  16. data/vendor/assets/javascripts/nvd3/.git.sample/hooks/pre-commit.sample +50 -0
  17. data/vendor/assets/javascripts/nvd3/.git.sample/hooks/pre-push.sample +53 -0
  18. data/vendor/assets/javascripts/nvd3/.git.sample/hooks/pre-rebase.sample +169 -0
  19. data/vendor/assets/javascripts/nvd3/.git.sample/hooks/prepare-commit-msg.sample +36 -0
  20. data/vendor/assets/javascripts/nvd3/.git.sample/hooks/update.sample +128 -0
  21. data/vendor/assets/javascripts/nvd3/.git.sample/index +0 -0
  22. data/vendor/assets/javascripts/nvd3/.git.sample/info/exclude +6 -0
  23. data/vendor/assets/javascripts/nvd3/.git.sample/logs/HEAD +1 -0
  24. data/vendor/assets/javascripts/nvd3/.git.sample/logs/refs/heads/master +1 -0
  25. data/vendor/assets/javascripts/nvd3/.git.sample/logs/refs/remotes/origin/HEAD +1 -0
  26. data/vendor/assets/javascripts/nvd3/.git.sample/objects/pack/pack-babbb312d58dd7f03870b530a1b9a84c80918be3.idx +0 -0
  27. data/vendor/assets/javascripts/nvd3/.git.sample/objects/pack/pack-babbb312d58dd7f03870b530a1b9a84c80918be3.pack +0 -0
  28. data/vendor/assets/javascripts/nvd3/.git.sample/packed-refs +5 -0
  29. data/vendor/assets/javascripts/nvd3/.git.sample/refs/heads/master +1 -0
  30. data/vendor/assets/javascripts/nvd3/.git.sample/refs/remotes/origin/HEAD +1 -0
  31. data/vendor/assets/javascripts/nvd3/.gitignore +24 -0
  32. data/vendor/assets/javascripts/nvd3/LICENSE.md +49 -0
  33. data/vendor/assets/javascripts/nvd3/Makefile +56 -0
  34. data/vendor/assets/javascripts/nvd3/README.md +43 -0
  35. data/vendor/assets/javascripts/nvd3/build.bat +6 -0
  36. data/vendor/assets/javascripts/nvd3/deprecated/bar.html +198 -0
  37. data/vendor/assets/javascripts/nvd3/deprecated/bar.js +250 -0
  38. data/vendor/assets/javascripts/nvd3/deprecated/charts/cumulativeLineChart.js +174 -0
  39. data/vendor/assets/javascripts/nvd3/deprecated/charts/discreteBarChart.js +157 -0
  40. data/vendor/assets/javascripts/nvd3/deprecated/charts/lineChart.js +159 -0
  41. data/vendor/assets/javascripts/nvd3/deprecated/charts/lineChartDaily.js +168 -0
  42. data/vendor/assets/javascripts/nvd3/deprecated/charts/stackedAreaChart.js +177 -0
  43. data/vendor/assets/javascripts/nvd3/deprecated/cumulativeLine.html +171 -0
  44. data/vendor/assets/javascripts/nvd3/deprecated/cumulativeLine.js +334 -0
  45. data/vendor/assets/javascripts/nvd3/deprecated/discreteBarChartWithEnabledTooltip.html +129 -0
  46. data/vendor/assets/javascripts/nvd3/deprecated/discreteBarChartWithEnabledTooltip.js +222 -0
  47. data/vendor/assets/javascripts/nvd3/deprecated/discreteBarWithAxes.html +172 -0
  48. data/vendor/assets/javascripts/nvd3/deprecated/discreteBarWithAxes.js +152 -0
  49. data/vendor/assets/javascripts/nvd3/deprecated/lineChart-old.html +83 -0
  50. data/vendor/assets/javascripts/nvd3/deprecated/lineChartDaily.html +109 -0
  51. data/vendor/assets/javascripts/nvd3/deprecated/linePlusBar.html +173 -0
  52. data/vendor/assets/javascripts/nvd3/deprecated/linePlusBar.js +250 -0
  53. data/vendor/assets/javascripts/nvd3/deprecated/lineWithFocus.html +137 -0
  54. data/vendor/assets/javascripts/nvd3/deprecated/lineWithFocus.js +354 -0
  55. data/vendor/assets/javascripts/nvd3/deprecated/lineWithFourAxes.html +144 -0
  56. data/vendor/assets/javascripts/nvd3/deprecated/lineWithFourAxes.js +218 -0
  57. data/vendor/assets/javascripts/nvd3/deprecated/lineWithLegend.html +142 -0
  58. data/vendor/assets/javascripts/nvd3/deprecated/lineWithLegend.js +176 -0
  59. data/vendor/assets/javascripts/nvd3/deprecated/monthendAxis.html +99 -0
  60. data/vendor/assets/javascripts/nvd3/deprecated/multiBarHorizontalWithLegend.html +258 -0
  61. data/vendor/assets/javascripts/nvd3/deprecated/multiBarHorizontalWithLegend.js +226 -0
  62. data/vendor/assets/javascripts/nvd3/deprecated/multiBarWithLegend.html +162 -0
  63. data/vendor/assets/javascripts/nvd3/deprecated/multiBarWithLegend.js +249 -0
  64. data/vendor/assets/javascripts/nvd3/deprecated/pie.js +263 -0
  65. data/vendor/assets/javascripts/nvd3/deprecated/scatterChart.html +110 -0
  66. data/vendor/assets/javascripts/nvd3/deprecated/scatterChart.js +294 -0
  67. data/vendor/assets/javascripts/nvd3/deprecated/scatterFisheyeChart.js +418 -0
  68. data/vendor/assets/javascripts/nvd3/deprecated/scatterWithLegend.html +167 -0
  69. data/vendor/assets/javascripts/nvd3/deprecated/scatterWithLegend.js +261 -0
  70. data/vendor/assets/javascripts/nvd3/deprecated/stackedArea.js +286 -0
  71. data/vendor/assets/javascripts/nvd3/deprecated/stackedAreaChart.html +183 -0
  72. data/vendor/assets/javascripts/nvd3/deprecated/stackedAreaChart_old.html +137 -0
  73. data/vendor/assets/javascripts/nvd3/deprecated/stackedAreaWithLegend.html +222 -0
  74. data/vendor/assets/javascripts/nvd3/deprecated/stackedAreaWithLegend.js +297 -0
  75. data/vendor/assets/javascripts/nvd3/examples/bullet.html +96 -0
  76. data/vendor/assets/javascripts/nvd3/examples/bulletChart.html +94 -0
  77. data/vendor/assets/javascripts/nvd3/examples/crossfilter.html +167 -0
  78. data/vendor/assets/javascripts/nvd3/examples/crossfilterWithDimentions.html +180 -0
  79. data/vendor/assets/javascripts/nvd3/examples/crossfilterWithTables.html +288 -0
  80. data/vendor/assets/javascripts/nvd3/examples/cumulativeLineChart.html +155 -0
  81. data/vendor/assets/javascripts/nvd3/examples/discreteBarChart.html +116 -0
  82. data/vendor/assets/javascripts/nvd3/examples/dynamicTimeSeries.html +148 -0
  83. data/vendor/assets/javascripts/nvd3/examples/historicalBar.html +157 -0
  84. data/vendor/assets/javascripts/nvd3/examples/horizon.html +163 -0
  85. data/vendor/assets/javascripts/nvd3/examples/images/grey-minus.png +0 -0
  86. data/vendor/assets/javascripts/nvd3/examples/images/grey-plus.png +0 -0
  87. data/vendor/assets/javascripts/nvd3/examples/indentedtree.html +126 -0
  88. data/vendor/assets/javascripts/nvd3/examples/legend.html +75 -0
  89. data/vendor/assets/javascripts/nvd3/examples/line.html +95 -0
  90. data/vendor/assets/javascripts/nvd3/examples/lineChart.html +112 -0
  91. data/vendor/assets/javascripts/nvd3/examples/lineChartSVGResize.html +151 -0
  92. data/vendor/assets/javascripts/nvd3/examples/linePlusBarChart.html +114 -0
  93. data/vendor/assets/javascripts/nvd3/examples/linePlusBarWithFocusChart.html +128 -0
  94. data/vendor/assets/javascripts/nvd3/examples/lineTimeSeries.html +142 -0
  95. data/vendor/assets/javascripts/nvd3/examples/lineWithFisheyeChart.html +101 -0
  96. data/vendor/assets/javascripts/nvd3/examples/lineWithFocusChart.html +87 -0
  97. data/vendor/assets/javascripts/nvd3/examples/multiBar.html +92 -0
  98. data/vendor/assets/javascripts/nvd3/examples/multiBarChart.html +93 -0
  99. data/vendor/assets/javascripts/nvd3/examples/multiBarHorizontalChart.html +388 -0
  100. data/vendor/assets/javascripts/nvd3/examples/multiChart.html +93 -0
  101. data/vendor/assets/javascripts/nvd3/examples/nations.json +1 -0
  102. data/vendor/assets/javascripts/nvd3/examples/pie.html +93 -0
  103. data/vendor/assets/javascripts/nvd3/examples/pieChart.html +114 -0
  104. data/vendor/assets/javascripts/nvd3/examples/scatter.html +95 -0
  105. data/vendor/assets/javascripts/nvd3/examples/scatterChart.html +115 -0
  106. data/vendor/assets/javascripts/nvd3/examples/scatterPlusLineChart.html +116 -0
  107. data/vendor/assets/javascripts/nvd3/examples/sparkline.html +62 -0
  108. data/vendor/assets/javascripts/nvd3/examples/sparklinePlus.html +67 -0
  109. data/vendor/assets/javascripts/nvd3/examples/stackedArea.html +155 -0
  110. data/vendor/assets/javascripts/nvd3/examples/stackedAreaChart.html +245 -0
  111. data/vendor/assets/javascripts/nvd3/examples/stream_layers.js +35 -0
  112. data/vendor/assets/javascripts/nvd3/lib/cie.js +155 -0
  113. data/vendor/assets/javascripts/nvd3/lib/crossfilter.js +1180 -0
  114. data/vendor/assets/javascripts/nvd3/lib/crossfilter.min.js +1 -0
  115. data/vendor/assets/javascripts/nvd3/lib/d3.v2.js +7033 -0
  116. data/vendor/assets/javascripts/nvd3/lib/d3.v2.min.js +4 -0
  117. data/vendor/assets/javascripts/nvd3/lib/fisheye.js +86 -0
  118. data/vendor/assets/javascripts/nvd3/lib/hive.js +80 -0
  119. data/vendor/assets/javascripts/nvd3/lib/horizon.js +192 -0
  120. data/vendor/assets/javascripts/nvd3/lib/sankey.js +292 -0
  121. data/vendor/assets/javascripts/nvd3/nv.d3.js +11762 -0
  122. data/vendor/assets/javascripts/nvd3/src/core.js +117 -0
  123. data/vendor/assets/javascripts/nvd3/src/models/axis.js +398 -0
  124. data/vendor/assets/javascripts/nvd3/src/models/backup/bullet.js +250 -0
  125. data/vendor/assets/javascripts/nvd3/src/models/backup/bulletChart.js +349 -0
  126. data/vendor/assets/javascripts/nvd3/src/models/bullet.js +377 -0
  127. data/vendor/assets/javascripts/nvd3/src/models/bulletChart.js +341 -0
  128. data/vendor/assets/javascripts/nvd3/src/models/cumulativeLineChart.js +609 -0
  129. data/vendor/assets/javascripts/nvd3/src/models/discreteBar.js +327 -0
  130. data/vendor/assets/javascripts/nvd3/src/models/discreteBarChart.js +290 -0
  131. data/vendor/assets/javascripts/nvd3/src/models/distribution.js +146 -0
  132. data/vendor/assets/javascripts/nvd3/src/models/historicalBar.js +289 -0
  133. data/vendor/assets/javascripts/nvd3/src/models/indentedTree.js +306 -0
  134. data/vendor/assets/javascripts/nvd3/src/models/legend.js +203 -0
  135. data/vendor/assets/javascripts/nvd3/src/models/line.js +286 -0
  136. data/vendor/assets/javascripts/nvd3/src/models/lineChart.js +359 -0
  137. data/vendor/assets/javascripts/nvd3/src/models/lineDynTimeSeriesChart.js +434 -0
  138. data/vendor/assets/javascripts/nvd3/src/models/linePlusBarChart.js +422 -0
  139. data/vendor/assets/javascripts/nvd3/src/models/linePlusBarWithFocusChart.js +657 -0
  140. data/vendor/assets/javascripts/nvd3/src/models/lineTimeSeriesChart.js +340 -0
  141. data/vendor/assets/javascripts/nvd3/src/models/lineWithFisheye.js +197 -0
  142. data/vendor/assets/javascripts/nvd3/src/models/lineWithFisheyeChart.js +324 -0
  143. data/vendor/assets/javascripts/nvd3/src/models/lineWithFocusChart.js +565 -0
  144. data/vendor/assets/javascripts/nvd3/src/models/multiAxisLineChart.js +312 -0
  145. data/vendor/assets/javascripts/nvd3/src/models/multiBar.js +416 -0
  146. data/vendor/assets/javascripts/nvd3/src/models/multiBarChart.js +445 -0
  147. data/vendor/assets/javascripts/nvd3/src/models/multiBarHorizontal.js +420 -0
  148. data/vendor/assets/javascripts/nvd3/src/models/multiBarHorizontalChart.js +415 -0
  149. data/vendor/assets/javascripts/nvd3/src/models/multiBarTimeSeries.js +371 -0
  150. data/vendor/assets/javascripts/nvd3/src/models/multiBarTimeSeriesChart.js +403 -0
  151. data/vendor/assets/javascripts/nvd3/src/models/multiChart.js +444 -0
  152. data/vendor/assets/javascripts/nvd3/src/models/ohlcBar.js +365 -0
  153. data/vendor/assets/javascripts/nvd3/src/models/pie.js +358 -0
  154. data/vendor/assets/javascripts/nvd3/src/models/pieChart.js +281 -0
  155. data/vendor/assets/javascripts/nvd3/src/models/scatter.js +622 -0
  156. data/vendor/assets/javascripts/nvd3/src/models/scatterChart.js +576 -0
  157. data/vendor/assets/javascripts/nvd3/src/models/scatterPlusLineChart.js +577 -0
  158. data/vendor/assets/javascripts/nvd3/src/models/sparkline.js +179 -0
  159. data/vendor/assets/javascripts/nvd3/src/models/sparklinePlus.js +291 -0
  160. data/vendor/assets/javascripts/nvd3/src/models/stackedArea.js +336 -0
  161. data/vendor/assets/javascripts/nvd3/src/models/stackedAreaChart.js +453 -0
  162. data/vendor/assets/javascripts/nvd3/src/nv.d3.css +671 -0
  163. data/vendor/assets/javascripts/nvd3/src/tooltip.js +129 -0
  164. data/vendor/assets/javascripts/nvd3/src/utils.js +105 -0
  165. data/vendor/assets/javascripts/set-nvd3-env.js.erb +5 -0
  166. data/vendor/assets/stylesheets/nvd3-rails.css +3 -0
  167. metadata +233 -0
@@ -0,0 +1,36 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to prepare the commit log message.
4
+ # Called by "git commit" with the name of the file that has the
5
+ # commit message, followed by the description of the commit
6
+ # message's source. The hook's purpose is to edit the commit
7
+ # message file. If the hook fails with a non-zero status,
8
+ # the commit is aborted.
9
+ #
10
+ # To enable this hook, rename this file to "prepare-commit-msg".
11
+
12
+ # This hook includes three examples. The first comments out the
13
+ # "Conflicts:" part of a merge commit.
14
+ #
15
+ # The second includes the output of "git diff --name-status -r"
16
+ # into the message, just before the "git status" output. It is
17
+ # commented because it doesn't cope with --amend or with squashed
18
+ # commits.
19
+ #
20
+ # The third example adds a Signed-off-by line to the message, that can
21
+ # still be edited. This is rarely a good idea.
22
+
23
+ case "$2,$3" in
24
+ merge,)
25
+ /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
26
+
27
+ # ,|template,)
28
+ # /usr/bin/perl -i.bak -pe '
29
+ # print "\n" . `git diff --cached --name-status -r`
30
+ # if /^#/ && $first++ == 0' "$1" ;;
31
+
32
+ *) ;;
33
+ esac
34
+
35
+ # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
36
+ # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
@@ -0,0 +1,128 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to blocks unannotated tags from entering.
4
+ # Called by "git receive-pack" with arguments: refname sha1-old sha1-new
5
+ #
6
+ # To enable this hook, rename this file to "update".
7
+ #
8
+ # Config
9
+ # ------
10
+ # hooks.allowunannotated
11
+ # This boolean sets whether unannotated tags will be allowed into the
12
+ # repository. By default they won't be.
13
+ # hooks.allowdeletetag
14
+ # This boolean sets whether deleting tags will be allowed in the
15
+ # repository. By default they won't be.
16
+ # hooks.allowmodifytag
17
+ # This boolean sets whether a tag may be modified after creation. By default
18
+ # it won't be.
19
+ # hooks.allowdeletebranch
20
+ # This boolean sets whether deleting branches will be allowed in the
21
+ # repository. By default they won't be.
22
+ # hooks.denycreatebranch
23
+ # This boolean sets whether remotely creating branches will be denied
24
+ # in the repository. By default this is allowed.
25
+ #
26
+
27
+ # --- Command line
28
+ refname="$1"
29
+ oldrev="$2"
30
+ newrev="$3"
31
+
32
+ # --- Safety check
33
+ if [ -z "$GIT_DIR" ]; then
34
+ echo "Don't run this script from the command line." >&2
35
+ echo " (if you want, you could supply GIT_DIR then run" >&2
36
+ echo " $0 <ref> <oldrev> <newrev>)" >&2
37
+ exit 1
38
+ fi
39
+
40
+ if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
41
+ echo "usage: $0 <ref> <oldrev> <newrev>" >&2
42
+ exit 1
43
+ fi
44
+
45
+ # --- Config
46
+ allowunannotated=$(git config --bool hooks.allowunannotated)
47
+ allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
48
+ denycreatebranch=$(git config --bool hooks.denycreatebranch)
49
+ allowdeletetag=$(git config --bool hooks.allowdeletetag)
50
+ allowmodifytag=$(git config --bool hooks.allowmodifytag)
51
+
52
+ # check for no description
53
+ projectdesc=$(sed -e '1q' "$GIT_DIR/description")
54
+ case "$projectdesc" in
55
+ "Unnamed repository"* | "")
56
+ echo "*** Project description file hasn't been set" >&2
57
+ exit 1
58
+ ;;
59
+ esac
60
+
61
+ # --- Check types
62
+ # if $newrev is 0000...0000, it's a commit to delete a ref.
63
+ zero="0000000000000000000000000000000000000000"
64
+ if [ "$newrev" = "$zero" ]; then
65
+ newrev_type=delete
66
+ else
67
+ newrev_type=$(git cat-file -t $newrev)
68
+ fi
69
+
70
+ case "$refname","$newrev_type" in
71
+ refs/tags/*,commit)
72
+ # un-annotated tag
73
+ short_refname=${refname##refs/tags/}
74
+ if [ "$allowunannotated" != "true" ]; then
75
+ echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
76
+ echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
77
+ exit 1
78
+ fi
79
+ ;;
80
+ refs/tags/*,delete)
81
+ # delete tag
82
+ if [ "$allowdeletetag" != "true" ]; then
83
+ echo "*** Deleting a tag is not allowed in this repository" >&2
84
+ exit 1
85
+ fi
86
+ ;;
87
+ refs/tags/*,tag)
88
+ # annotated tag
89
+ if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
90
+ then
91
+ echo "*** Tag '$refname' already exists." >&2
92
+ echo "*** Modifying a tag is not allowed in this repository." >&2
93
+ exit 1
94
+ fi
95
+ ;;
96
+ refs/heads/*,commit)
97
+ # branch
98
+ if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
99
+ echo "*** Creating a branch is not allowed in this repository" >&2
100
+ exit 1
101
+ fi
102
+ ;;
103
+ refs/heads/*,delete)
104
+ # delete branch
105
+ if [ "$allowdeletebranch" != "true" ]; then
106
+ echo "*** Deleting a branch is not allowed in this repository" >&2
107
+ exit 1
108
+ fi
109
+ ;;
110
+ refs/remotes/*,commit)
111
+ # tracking branch
112
+ ;;
113
+ refs/remotes/*,delete)
114
+ # delete tracking branch
115
+ if [ "$allowdeletebranch" != "true" ]; then
116
+ echo "*** Deleting a tracking branch is not allowed in this repository" >&2
117
+ exit 1
118
+ fi
119
+ ;;
120
+ *)
121
+ # Anything else (is there anything else?)
122
+ echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
123
+ exit 1
124
+ ;;
125
+ esac
126
+
127
+ # --- Finished
128
+ exit 0
@@ -0,0 +1,6 @@
1
+ # git ls-files --others --exclude-from=.git/info/exclude
2
+ # Lines that start with '#' are comments.
3
+ # For a project mostly in C, the following would be a good set of
4
+ # exclude patterns (uncomment them if you want to use them):
5
+ # *.[oa]
6
+ # *~
@@ -0,0 +1 @@
1
+ 0000000000000000000000000000000000000000 715f3056377930466faef8a0ec188181b7ffb7ac NealKemp <me@nealke.mp> 1366009474 -0700 clone: from git@github.com:NealKemp/nvd3.git
@@ -0,0 +1 @@
1
+ 0000000000000000000000000000000000000000 715f3056377930466faef8a0ec188181b7ffb7ac NealKemp <me@nealke.mp> 1366009474 -0700 clone: from git@github.com:NealKemp/nvd3.git
@@ -0,0 +1 @@
1
+ 0000000000000000000000000000000000000000 715f3056377930466faef8a0ec188181b7ffb7ac NealKemp <me@nealke.mp> 1366009474 -0700 clone: from git@github.com:NealKemp/nvd3.git
@@ -0,0 +1,5 @@
1
+ # pack-refs with: peeled fully-peeled
2
+ c2a5df5d3b64601191a9a02aa74cae2cebc419d6 refs/remotes/origin/adeven_production
3
+ a55282baed7a5c4bc7a18138556835dfd2ea851f refs/remotes/origin/gh-pages
4
+ 715f3056377930466faef8a0ec188181b7ffb7ac refs/remotes/origin/master
5
+ 307e3c32db4ae0c97e536c8bea9adba8ce188aa4 refs/remotes/origin/update
@@ -0,0 +1 @@
1
+ 715f3056377930466faef8a0ec188181b7ffb7ac
@@ -0,0 +1 @@
1
+ ref: refs/remotes/origin/master
@@ -0,0 +1,24 @@
1
+
2
+ # Jekyll Files #
3
+ ################
4
+ _site
5
+
6
+
7
+ # Random Files #
8
+ ################
9
+ *.swp
10
+ *~
11
+ *.log
12
+
13
+
14
+ # Private Test Data #
15
+ #####################
16
+ *REALDATA*
17
+
18
+
19
+ # OS generated files #
20
+ ######################
21
+ .DS_Store*
22
+ ehthumbs.db
23
+ Icon?
24
+ Thumbs.db
@@ -0,0 +1,49 @@
1
+
2
+ ##nvd3.js License
3
+
4
+ Copyright (c) 2011, 2012 [Novus Partners, Inc.][novus]
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+
18
+ [novus]: https://www.novus.com/
19
+
20
+
21
+
22
+ ##d3.js License
23
+
24
+ Copyright (c) 2012, Michael Bostock
25
+ All rights reserved.
26
+
27
+ Redistribution and use in source and binary forms, with or without
28
+ modification, are permitted provided that the following conditions are met:
29
+
30
+ * Redistributions of source code must retain the above copyright notice, this
31
+ list of conditions and the following disclaimer.
32
+
33
+ * Redistributions in binary form must reproduce the above copyright notice,
34
+ this list of conditions and the following disclaimer in the documentation
35
+ and/or other materials provided with the distribution.
36
+
37
+ * The name Michael Bostock may not be used to endorse or promote products
38
+ derived from this software without specific prior written permission.
39
+
40
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
41
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
43
+ DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
44
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
45
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
46
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
47
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
48
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
49
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,56 @@
1
+ JS_FILES = \
2
+ src/intro.js \
3
+ src/core.js \
4
+ src/tooltip.js \
5
+ src/utils.js \
6
+ src/models/axis.js \
7
+ src/models/historicalBar.js \
8
+ src/models/bullet.js \
9
+ src/models/bulletChart.js \
10
+ src/models/cumulativeLineChart.js \
11
+ src/models/discreteBar.js \
12
+ src/models/discreteBarChart.js \
13
+ src/models/distribution.js \
14
+ src/models/indentedTree.js \
15
+ src/models/legend.js \
16
+ src/models/line.js \
17
+ src/models/lineChart.js \
18
+ src/models/linePlusBarChart.js \
19
+ src/models/lineWithFocusChart.js \
20
+ src/models/multiBar.js \
21
+ src/models/multiBarChart.js \
22
+ src/models/multiBarHorizontal.js \
23
+ src/models/multiBarHorizontalChart.js \
24
+ src/models/multiChart.js \
25
+ src/models/ohlcBar.js \
26
+ src/models/pie.js \
27
+ src/models/pieChart.js \
28
+ src/models/scatter.js \
29
+ src/models/scatterChart.js \
30
+ src/models/scatterPlusLineChart.js \
31
+ src/models/sparkline.js \
32
+ src/models/sparklinePlus.js \
33
+ src/models/stackedArea.js \
34
+ src/models/stackedAreaChart.js \
35
+ src/models/multiAxisLineChart.js \
36
+ src/outro.js
37
+
38
+ JS_COMPILER = \
39
+ uglifyjs
40
+
41
+ all: nv.d3.js nv.d3.min.js
42
+ nv.d3.js: $(JS_FILES)
43
+ nv.d3.min.js: $(JS_FILES)
44
+
45
+ nv.d3.js: Makefile
46
+ rm -f $@
47
+ cat $(filter %.js,$^) >> $@
48
+
49
+ %.min.js:: Makefile
50
+ rm -f $@
51
+ cat $(filter %.js,$^) | $(JS_COMPILER) >> $@
52
+
53
+ clean:
54
+ rm -rf nv.d3.js nv.d3.min.js
55
+
56
+
@@ -0,0 +1,43 @@
1
+ Please see Novus' official statement on nvd3 with an explanation,
2
+ apology, and commitment to its permanent status as an open-source
3
+ project.
4
+ [http://nvd3.org/statement.html](http://nvd3.org/statement.html)
5
+
6
+ # nvd3 - v0.0.1
7
+
8
+ A reusable chart library for d3.JS.
9
+
10
+ Currently in an early stage of development, but will be a very active project. It may change quite a bit from its current state, but will always try to follow the style in which d3.js was done.
11
+
12
+ You can also check out the [examples page](http://nvd3.org/ghpages/examples.html)
13
+
14
+ ---
15
+
16
+ If one of [the existing models](https://github.com/novus/nvd3/tree/master/src/models) doesn't meet your needs, fork the project, implement the model and an example using it, send us a pull request, for consideration for inclusion in the project.
17
+
18
+ ---
19
+
20
+ Minifying your fork:
21
+
22
+ The Makefile requires [UglifyJS](https://github.com/mishoo/UglifyJS).
23
+
24
+ The easiest way to install is to install via npm. Run `npm install
25
+ uglify-js` from your home directory, then add the output from `npm bin`
26
+ into your path so that you have access to `uglifyjs` from the command
27
+ line (remember to restart your terminal window when adding to the path.)
28
+
29
+ Once you have `uglifyjs` command available, running `make` from your
30
+ fork's root directory will rebuild both `nv.d3.js` and `nv.d3.min.js`.
31
+
32
+ Without UglifyJS, you won't get the minified version when running make.
33
+
34
+ **We ask that you DO NOT minify pull requests...
35
+ If you need to minify please build pull request in separate branch, and
36
+ merge and minify in yout master.
37
+
38
+ ## (Officially) Supported Browsers
39
+
40
+ * Chrome latest version (preferred)
41
+ * Firefox latest version
42
+ * Safari latest version
43
+ * Internet Explorer 9 and 10
@@ -0,0 +1,6 @@
1
+ @echo off
2
+ copy src\intro.js /B + src\core.js /B + src\tooltip.js /B temp1.js /B
3
+ copy src\models\*.js /B temp2.js /B
4
+ copy temp1.js /B + temp2.js /B + src\outro.js /B nv.d3.js /B
5
+ del temp1.js
6
+ del temp2.js
@@ -0,0 +1,198 @@
1
+ <!DOCTYPE html>
2
+ <meta charset="utf-8">
3
+ <link href="../src/d3.css" rel="stylesheet" type="text/css">
4
+ <style>
5
+
6
+ body {
7
+ overflow-y:scroll;
8
+ }
9
+
10
+ text {
11
+ font: 12px sans-serif;
12
+ }
13
+
14
+ </style>
15
+ <body>
16
+
17
+ <svg id="test1"></svg>
18
+
19
+ <script src="../lib/d3.v2.js"></script>
20
+ <script src="../nv.d3.js"></script>
21
+ <script src="../src/models/bar.js"></script>
22
+ <script>
23
+
24
+ var testdata = [
25
+ {
26
+ label: "One is a very long",
27
+ y: 5
28
+ },
29
+ {
30
+ label: "Two is also very long",
31
+ y: 2
32
+ },
33
+ {
34
+ label: "Three",
35
+ y: 9
36
+ },
37
+ {
38
+ label: "Four",
39
+ y: 7
40
+ },
41
+ {
42
+ label: "Five",
43
+ y: 4
44
+ },
45
+ {
46
+ label: "Six",
47
+ y: 3
48
+ }
49
+ ];
50
+
51
+
52
+ var testdata2 = [
53
+ {
54
+ label: "One is a very long",
55
+ y: 1
56
+ },
57
+ {
58
+ label: "Two is also very long",
59
+ y: 12
60
+ },
61
+ {
62
+ label: "Three",
63
+ y: -9
64
+ },
65
+ {
66
+ label: "Four",
67
+ y: 4
68
+ },
69
+ {
70
+ label: "Five",
71
+ y: 6
72
+ }
73
+ ];
74
+
75
+ var td = 0;
76
+ var a = (Math.random()*10)+1;
77
+ if (a > 5) td = 1;
78
+
79
+ //Format A
80
+ nv.addGraph({
81
+ generate: function() {
82
+ var width = nv.utils.windowSize().width - 40,
83
+ height = nv.utils.windowSize().height - 40;
84
+
85
+ var chart = nv.models.bar()
86
+ .width(width)
87
+ .height(height)
88
+ .labelField('label')
89
+ .dataField('y')
90
+ .showLabels(true)
91
+ .title("This is a sample chart title")
92
+ ;
93
+
94
+ if (td === 0) {
95
+ d3.select("#test1")
96
+ .attr('width', width)
97
+ .attr('height', height)
98
+ .datum(testdata)
99
+ .call(chart);
100
+ } else {
101
+ d3.select("#test1")
102
+ .attr('width', width)
103
+ .attr('height', height)
104
+ .datum(testdata2)
105
+ .call(chart);
106
+ }
107
+
108
+ return chart;
109
+ },
110
+ callback: function(graph) {
111
+
112
+ graph.dispatch.on('tooltipShow', function(e) {
113
+ var offsetElement = document.getElementById("chart"),
114
+ left = e.pos[0],
115
+ top = e.pos[1];
116
+
117
+ var content = '<h3>' + e.label + '</h3>' +
118
+ '<p>' +
119
+ e.value +
120
+ '</p>';
121
+
122
+ nv.tooltip.show([left, top], content);
123
+ });
124
+
125
+ graph.dispatch.on('tooltipHide', function(e) {
126
+ nv.tooltip.cleanup();
127
+ });
128
+
129
+ graph.dispatch.on('elementClick', function(e) {
130
+ console.log("Bar Click",e);
131
+ });
132
+
133
+ graph.dispatch.on('chartClick', function(e) {
134
+ console.log("Chart Click",e);
135
+ });
136
+
137
+ graph.dispatch.on('chartClick', function(e) {
138
+ console.log('Click Switching to');
139
+ if (td === 0) {
140
+ d3.select("#test1")
141
+ .datum(testdata2)
142
+ .call(graph);
143
+ td = 1;
144
+
145
+ } else {
146
+ d3.select("#test1")
147
+ .datum(testdata)
148
+ .call(graph);
149
+ td = 0;
150
+ }
151
+ });
152
+
153
+
154
+ window.onresize = function() {
155
+ var width = nv.utils.windowSize().width - 40,
156
+ height = nv.utils.windowSize().height - 40;
157
+
158
+ d3.select("#test1")
159
+ .attr('width', width)
160
+ .attr('height', height)
161
+ .call(
162
+ graph
163
+ .width(width)
164
+ .height(height)
165
+ )
166
+ };
167
+ }
168
+ });
169
+
170
+ /*
171
+ //Format B
172
+ nv.addGraph(function() {
173
+ var selection = d3.select("body")
174
+ .datum(irwinHallDistribution(10000, 10));
175
+
176
+ var chart = nv.models.histogram()
177
+ .bins(d3.scale.linear().ticks(20))
178
+ .tickFormat(d3.format(".02f"));
179
+
180
+ chart(selection);
181
+
182
+ return chart;
183
+ }, function(g) { console.log(g.width(), g.height()) })
184
+
185
+ //Format C
186
+ nv.addGraph(function() {
187
+ return nv.models.histogram()
188
+ .bins(d3.scale.linear().ticks(20))
189
+ .tickFormat(d3.format(".02f"))(
190
+ d3.select("body")
191
+ .datum(irwinHallDistribution(10000, 10))
192
+ );
193
+ }, function(g) { console.log(g.width(), g.height()) })
194
+ */
195
+
196
+
197
+
198
+ </script>