Browse Source

docs: migrate c3js.org to c3 repo (#2332)

pull/2333/head v0.5.2-doc-test-0
Yoshiya Hinosawa 7 years ago committed by GitHub
parent
commit
f4617fa2e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 49
      .circleci/config.yml
  2. 15
      Gemfile
  3. 278
      Gemfile.lock
  4. 3
      README.md
  5. 33
      config.rb
  6. 315
      data/samples.yml
  7. 157
      docs/404.html
  8. 1
      docs/CNAME
  9. 3
      docs/_footer.haml
  10. 4
      docs/_index_item.haml
  11. 4
      docs/_index_item_title.haml
  12. 3
      docs/_reference_item_link.haml
  13. 5
      docs/_reference_menu_item.haml
  14. 34
      docs/_sample.haml
  15. 36
      docs/_sample_editor.haml
  16. 17
      docs/_samples_header.haml
  17. 9
      docs/_script.haml
  18. 22
      docs/_script_scroll.haml
  19. 2
      docs/_sidemenu_item.haml
  20. BIN
      docs/apple-touch-icon-114x114-precomposed.png
  21. BIN
      docs/apple-touch-icon-144x144-precomposed.png
  22. BIN
      docs/apple-touch-icon-57x57-precomposed.png
  23. BIN
      docs/apple-touch-icon-72x72-precomposed.png
  24. BIN
      docs/apple-touch-icon-precomposed.png
  25. BIN
      docs/apple-touch-icon.png
  26. 15
      docs/crossdomain.xml
  27. 8
      docs/css/bootstrap.min.css
  28. 174
      docs/css/c3.css
  29. 0
      docs/css/examples.css
  30. 5264
      docs/css/foundation.css
  31. 1
      docs/css/foundation.min.css
  32. 3
      docs/css/gettingstarted.css
  33. 0
      docs/css/index.css
  34. 423
      docs/css/normalize.css
  35. 21
      docs/css/reference.css
  36. 0
      docs/css/samples/api_axis_label.css
  37. 0
      docs/css/samples/api_axis_range.css
  38. 0
      docs/css/samples/api_data_color.css
  39. 0
      docs/css/samples/api_data_name.css
  40. 0
      docs/css/samples/api_flow.css
  41. 0
      docs/css/samples/api_grid_x.css
  42. 0
      docs/css/samples/api_resize.css
  43. 0
      docs/css/samples/axes_label.css
  44. 0
      docs/css/samples/axes_label_position.css
  45. 0
      docs/css/samples/axes_rotated.css
  46. 0
      docs/css/samples/axes_x_localtime.css
  47. 0
      docs/css/samples/axes_x_tick_count.css
  48. 0
      docs/css/samples/axes_x_tick_culling.css
  49. 0
      docs/css/samples/axes_x_tick_fit.css
  50. 0
      docs/css/samples/axes_x_tick_format.css
  51. 0
      docs/css/samples/axes_x_tick_rotate.css
  52. 0
      docs/css/samples/axes_x_tick_values.css
  53. 0
      docs/css/samples/axes_y2.css
  54. 0
      docs/css/samples/axes_y_padding.css
  55. 0
      docs/css/samples/axes_y_range.css
  56. 0
      docs/css/samples/axes_y_tick_format.css
  57. 0
      docs/css/samples/categorized.css
  58. 0
      docs/css/samples/chart_area.css
  59. 0
      docs/css/samples/chart_area_stacked.css
  60. 0
      docs/css/samples/chart_bar.css
  61. 0
      docs/css/samples/chart_bar_negative.css
  62. 0
      docs/css/samples/chart_bar_stacked.css
  63. 0
      docs/css/samples/chart_combination.css
  64. 0
      docs/css/samples/chart_donut.css
  65. 0
      docs/css/samples/chart_gauge.css
  66. 0
      docs/css/samples/chart_pie.css
  67. 0
      docs/css/samples/chart_scatter.css
  68. 0
      docs/css/samples/chart_spline.css
  69. 0
      docs/css/samples/chart_step.css
  70. 0
      docs/css/samples/data_color.css
  71. 0
      docs/css/samples/data_columned.css
  72. 0
      docs/css/samples/data_json.css
  73. 0
      docs/css/samples/data_label.css
  74. 0
      docs/css/samples/data_label_format.css
  75. 0
      docs/css/samples/data_load.css
  76. 0
      docs/css/samples/data_name.css
  77. 0
      docs/css/samples/data_order.css
  78. 0
      docs/css/samples/data_rowed.css
  79. 0
      docs/css/samples/data_stringx.css
  80. 0
      docs/css/samples/data_url.css
  81. 0
      docs/css/samples/data_xformat.css
  82. 0
      docs/css/samples/grid_x_lines.css
  83. 0
      docs/css/samples/grid_y_lines.css
  84. 0
      docs/css/samples/interaction_zoom.css
  85. 7
      docs/css/samples/legend_custom.css
  86. 0
      docs/css/samples/legend_position.css
  87. 0
      docs/css/samples/options_color.css
  88. 0
      docs/css/samples/options_gridline.css
  89. 0
      docs/css/samples/options_legend.css
  90. 0
      docs/css/samples/options_padding.css
  91. 0
      docs/css/samples/options_size.css
  92. 0
      docs/css/samples/options_subchart.css
  93. 0
      docs/css/samples/pie_label_format.css
  94. 0
      docs/css/samples/point_show.css
  95. 6
      docs/css/samples/region.css
  96. 0
      docs/css/samples/region_timeseries.css
  97. 0
      docs/css/samples/simple_multiple.css
  98. 0
      docs/css/samples/simple_regions.css
  99. 0
      docs/css/samples/simple_xy.css
  100. 0
      docs/css/samples/simple_xy_multiple.css
  101. Some files were not shown because too many files have changed in this diff Show More

49
.circleci/config.yml

@ -1,7 +1,6 @@
version: 2 version: 2
jobs: jobs:
build: test:
working_directory: ~/working_directory
docker: docker:
- image: circleci/node:6-browsers - image: circleci/node:6-browsers
env: env:
@ -9,18 +8,54 @@ jobs:
- CHROME_BIN=/usr/bin/google-chrome - CHROME_BIN=/usr/bin/google-chrome
steps: steps:
- checkout - checkout
- run: - run: |
name: System information
command: |
echo "node $(node -v)" echo "node $(node -v)"
echo "npm v$(npm --version)" echo "npm v$(npm --version)"
echo "$(google-chrome --version)" echo "$(google-chrome --version)"
- restore_cache: - restore_cache:
key: v1-npm-dependencies-{{ .Branch }}-{{ checksum "package.json" }} key: deps-npm-{{ checksum "package.json" }}
- run: npm install - run: npm install
- save_cache: - save_cache:
key: v1-npm-dependencies-{{ .Branch }}-{{ checksum "package.json" }} key: deps-npm-{{ checksum "package.json" }}
paths: paths:
- ./node_modules - ./node_modules
- run: npm test - run: npm test
- run: npm run codecov - run: npm run codecov
publish-docs:
docker:
- image: circleci/ruby:2.4-node
env:
BUNDLE_PATH: vendor/bundle
steps:
- checkout
- restore_cache:
key: deps-bundle-{{ checksum "Gemfile.lock" }}
- run: bundle install
- save_cache:
key: deps-bundle-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- restore_cache:
key: deps-npm-{{ checksum "package.json" }}
- run: npm install
- save_cache:
key: deps-npm-{{ checksum "package.json" }}
paths:
- ./node_modules
- run: npm run publish-docs
workflows:
version: 2
test:
jobs:
- test
publish-docs:
jobs:
- publish-docs:
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/

15
Gemfile

@ -0,0 +1,15 @@
# If you have OpenSSL installed, we recommend updating
# the following line to use "https"
source 'http://rubygems.org'
gem "middleman", "~>3.2.2"
# Live-reloading plugin
gem "middleman-livereload", "~> 3.1.0"
# Sync plugin
gem 'middleman-sync', '3.0.12'
gem 'unf'
# For faster file watcher updates on Windows:
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]

278
Gemfile.lock

@ -0,0 +1,278 @@
GEM
remote: http://rubygems.org/
specs:
CFPropertyList (2.3.5)
activemodel (3.2.22.5)
activesupport (= 3.2.22.5)
builder (~> 3.0.0)
activesupport (3.2.22.5)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
asset_sync (1.0.0)
activemodel
fog (>= 1.8.0)
builder (3.0.4)
chunky_png (1.3.8)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.12.2)
compass (1.0.3)
chunky_png (~> 1.2)
compass-core (~> 1.0.2)
compass-import-once (~> 1.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
sass (>= 3.3.13, < 3.5)
compass-core (1.0.3)
multi_json (~> 1.0)
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.3)
excon (0.55.0)
execjs (1.4.1)
multi_json (~> 1.0)
ffi (1.9.18)
fission (0.5.0)
CFPropertyList (~> 2.2)
fog (1.40.0)
fog-aliyun (>= 0.1.0)
fog-atmos
fog-aws (>= 0.6.0)
fog-brightbox (~> 0.4)
fog-cloudatcost (~> 0.1.0)
fog-core (~> 1.43)
fog-digitalocean (>= 0.3.0)
fog-dnsimple (~> 1.0)
fog-dynect (~> 0.0.2)
fog-ecloud (~> 0.1)
fog-google (<= 0.1.0)
fog-json
fog-local
fog-openstack
fog-powerdns (>= 0.1.1)
fog-profitbricks
fog-rackspace
fog-radosgw (>= 0.0.2)
fog-riakcs
fog-sakuracloud (>= 0.0.4)
fog-serverlove
fog-softlayer
fog-storm_on_demand
fog-terremark
fog-vmfusion
fog-voxel
fog-vsphere (>= 0.4.0)
fog-xenserver
fog-xml (~> 0.1.1)
ipaddress (~> 0.5)
json (>= 1.8, < 2.0)
fog-aliyun (0.1.0)
fog-core (~> 1.27)
fog-json (~> 1.0)
ipaddress (~> 0.8)
xml-simple (~> 1.1)
fog-atmos (0.1.0)
fog-core
fog-xml
fog-aws (1.3.0)
fog-core (~> 1.38)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-brightbox (0.11.0)
fog-core (~> 1.22)
fog-json
inflecto (~> 0.0.2)
fog-cloudatcost (0.1.2)
fog-core (~> 1.36)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-core (1.44.3)
builder
excon (~> 0.49)
formatador (~> 0.2)
fog-digitalocean (0.3.0)
fog-core (~> 1.42)
fog-json (>= 1.0)
fog-xml (>= 0.1)
ipaddress (>= 0.5)
fog-dnsimple (1.0.0)
fog-core (~> 1.38)
fog-json (~> 1.0)
fog-dynect (0.0.3)
fog-core
fog-json
fog-xml
fog-ecloud (0.3.0)
fog-core
fog-xml
fog-google (0.1.0)
fog-core
fog-json
fog-xml
fog-json (1.0.2)
fog-core (~> 1.0)
multi_json (~> 1.10)
fog-local (0.3.1)
fog-core (~> 1.27)
fog-openstack (0.1.20)
fog-core (>= 1.40)
fog-json (>= 1.0)
ipaddress (>= 0.8)
fog-powerdns (0.1.1)
fog-core (~> 1.27)
fog-json (~> 1.0)
fog-xml (~> 0.1)
fog-profitbricks (3.0.0)
fog-core (~> 1.42)
fog-json (~> 1.0)
fog-rackspace (0.1.5)
fog-core (>= 1.35)
fog-json (>= 1.0)
fog-xml (>= 0.1)
ipaddress (>= 0.8)
fog-radosgw (0.0.5)
fog-core (>= 1.21.0)
fog-json
fog-xml (>= 0.0.1)
fog-riakcs (0.1.0)
fog-core
fog-json
fog-xml
fog-sakuracloud (1.7.5)
fog-core
fog-json
fog-serverlove (0.1.2)
fog-core
fog-json
fog-softlayer (1.1.4)
fog-core
fog-json
fog-storm_on_demand (0.1.1)
fog-core
fog-json
fog-terremark (0.1.0)
fog-core
fog-xml
fog-vmfusion (0.1.0)
fission
fog-core
fog-voxel (0.1.0)
fog-core
fog-xml
fog-vsphere (1.10.0)
fog-core
rbvmomi (~> 1.9)
fog-xenserver (0.3.0)
fog-core
fog-xml
fog-xml (0.1.3)
fog-core
nokogiri (>= 1.5.11, < 2.0.0)
formatador (0.2.5)
haml (5.0.1)
temple (>= 0.8.0)
tilt
hike (1.2.3)
http_parser.rb (0.6.0)
i18n (0.6.11)
inflecto (0.0.2)
ipaddress (0.8.3)
json (1.8.6)
kramdown (1.13.2)
listen (1.3.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
middleman (3.2.2)
coffee-script (~> 2.2.0)
compass (>= 0.12.2)
execjs (~> 1.4.0)
haml (>= 3.1.6)
kramdown (~> 1.2)
middleman-core (= 3.2.2)
middleman-sprockets (>= 3.1.2)
sass (>= 3.1.20)
uglifier (~> 2.4.0)
middleman-core (3.2.2)
activesupport (~> 3.2.6)
bundler (~> 1.1)
i18n (~> 0.6.9)
listen (~> 1.1)
rack (>= 1.4.5)
rack-test (~> 0.6.1)
thor (>= 0.15.2, < 2.0)
tilt (~> 1.4.1)
middleman-livereload (3.1.1)
em-websocket (>= 0.2.0)
middleman-core (>= 3.0.2)
multi_json (~> 1.0)
rack-livereload
middleman-sprockets (3.3.3)
middleman-core (>= 3.2)
sprockets (~> 2.2)
sprockets-helpers (~> 1.1.0)
sprockets-sass (~> 1.1.0)
middleman-sync (3.0.12)
asset_sync (~> 1.0.0)
middleman-core (>= 3.0.0)
mini_portile2 (2.1.0)
multi_json (1.12.1)
nokogiri (1.7.2)
mini_portile2 (~> 2.1.0)
rack (1.6.8)
rack-livereload (0.3.16)
rack
rack-test (0.6.3)
rack (>= 1.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
rb-kqueue (0.2.5)
ffi (>= 0.5.0)
rbvmomi (1.11.2)
builder (~> 3.0)
json (>= 1.8)
nokogiri (~> 1.5)
trollop (~> 2.1)
sass (3.4.24)
sprockets (2.12.4)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-helpers (1.1.0)
sprockets (~> 2.0)
sprockets-sass (1.1.0)
sprockets (~> 2.0)
tilt (~> 1.1)
temple (0.8.0)
thor (0.19.4)
tilt (1.4.1)
trollop (2.1.2)
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.4)
xml-simple (1.1.5)
PLATFORMS
ruby
DEPENDENCIES
middleman (~> 3.2.2)
middleman-livereload (~> 3.1.0)
middleman-sync (= 3.0.12)
unf
wdm (~> 0.1.0)
BUNDLED WITH
1.15.0

3
README.md

@ -48,10 +48,13 @@ If you choose to submit a pull request, please do not bump the version number un
## Playground ## Playground
Please fork this fiddle: Please fork this fiddle:
+ http://jsfiddle.net/7kYJu/4742/ + http://jsfiddle.net/7kYJu/4742/
## Dependency ## Dependency
+ [D3.js](https://github.com/mbostock/d3) `^4.12.0` + [D3.js](https://github.com/mbostock/d3) `^4.12.0`
## License ## License
MIT MIT

33
config.rb

@ -0,0 +1,33 @@
helpers do
def js_as_plain(id)
f = open("docs/js/samples/" + id + ".js")
js = f.read
f.close
js
end
def data_as_plain(name)
f = open("docs/data/" + name)
data = f.read
f.close
data
end
def css_as_plain(name)
f = open("docs/css/samples/" + name)
css = f.read
f.close
css
end
def get_css_name(path)
path.gsub('.html', '')
end
end
set :source, 'docs'
set :haml, { :ugly => true, :format => :html5 }
set :css_dir, 'css'
set :js_dir, 'js'
set :images_dir, 'img'
configure :build do
activate :asset_hash, :ignore => %r{^js/ace/.*}
end

315
data/samples.yml

@ -0,0 +1,315 @@
simple_multiple:
title: 'Line Chart'
desc: 'Line chart with sequential data.'
timeseries:
title: Timeseries Chart
desc: Simple line chart with timeseries data.
chart_spline:
title: Spline Chart
desc: Display as Spline Chart.
simple_xy:
title: Simple XY Line Chart
desc: Simple line chart with custom x.
simple_xy_multiple:
title: Multiple XY Line Chart
desc: Multiple line chart with multiple custom x.
simple_regions:
title: Line Chart with Regions
desc: Set regions for each data with style.
chart_bar:
title: Bar Chart
desc: Display as Bar Chart.
chart_bar_stacked:
title: Stacked Bar Chart
desc: Display as Stacked Bar Chart.
chart_scatter:
title: Scatter Plot
desc: Display as Scatter Plot.
chart_pie:
title: Pie Chart
desc: Display as Pie Chart.
chart_donut:
title: Donut Chart
desc: Display as Donut Chart.
chart_gauge:
title: Gauge Chart
desc: Display as Gauge Chart.
chart_step:
title: Step Chart
desc: Display as Step Chart.
chart_area:
title: Area Chart
desc: Display as Area Chart.
chart_area_stacked:
title: Stacked Area Chart
desc: Display as Stacked Area Chart.
chart_combination:
title: Combination Chart
desc: Display all kinda charts up in here.
categorized:
title: Category Axis
desc: Show ticks as categorized by each data.
axes_y2:
title: Additional Y Axis
desc: Additional y axis can be added.
axes_rotated:
title: Rotated Axis
desc: Switch x and y axis position.
axes_x_localtime:
title: X Axis Timezone
desc: Convert time to UTC.
axes_x_tick_rotate:
title: Rotate X Axis Tick Text
desc: Rotate x axis tick text.
axes_x_tick_format:
title: X Axis Tick Format
desc: Format x axis tick text.
axes_y_tick_format:
title: Y Axis Tick Format
desc: Format y axis tick text.
axes_x_tick_culling:
title: X Axis Tick Culling
desc: Set cull ticks or not on X Axis.
axes_x_tick_values:
title: X Axis Tick Values
desc: Set tick texts on X Axis.
axes_x_tick_count:
title: X Axis Tick Count
desc: Set the number of ticks on X Axis.
axes_x_tick_fit:
title: X Axis Tick Fitting
desc: Set ticks position to x of data.
axes_label:
title: Axis Label
desc: Set label for axis.
axes_label_position:
title: Axis Label Position
desc: Set axis label position.
axes_y_padding:
title: Padding for Y Axis
desc: Set padding for y axis.
axes_y_range:
title: Range for Y Axis
desc: Set range for y axis.
data_columned:
title: Column Oriented Data
desc: Column-oriented data can be used as input.
data_rowed:
title: Row Oriented Data
desc: Row-oriented data can be used as input.
data_json:
title: JSON Data
desc: JSON can be used as input.
data_url:
title: Data from URL
desc: Data from URL can be used as input.
data_load:
title: Load Data
desc: Load data dynamically.
data_name:
title: Data Name
desc: Set name for each data.
data_stringx:
title: Category Data
desc: Load data with x values on category axis.
data_order:
title: Data Order
desc: Define data order. This will be used for stacked bar chart.
data_label:
title: Data Label
desc: Show label of data.
data_label_format:
title: Data Label Format
desc: Format label of data.
data_number_format_l10n:
title: Number Format Localization
desc: Number format localization using D3 locale settings.
data_color:
title: Data Color
desc: Set color according to data.
options_legend:
title: Hide Legend
desc: Set visibility of legend.
legend_position:
title: Legend Position
desc: Show legend on bottom or right side.
legend_custom:
title: Custom Legend
desc: Build custom legend
tooltip_show:
title: Hide Tooltip
desc: Set visibility of tooltip.
tooltip_grouped:
title: Tooltip Grouping
desc: Show tooltips as grouped or not.
tooltip_format:
title: Tooltip Format
desc: Set format for title and value on tooltip.
options_gridline:
title: Grid Lines
desc: Show grid lines for x and y axis.
grid_x_lines:
title: Optional X Grid Lines
desc: Add optional grid lines on x grid.
grid_y_lines:
title: Optional Y Grid Lines
desc: Add optional grid lines on y grid.
options_subchart:
title: Sub Chart
desc: Show sub chart for zoom and selection range.
interaction_zoom:
title: Zoom
desc: Zoom by mouse wheel event and slide by drag.
region:
title: Region
desc: Show rects on chart.
region_timeseries:
title: Region with Timeseries
desc: Show rects on timeseries chart.
options_size:
title: Chart Size
desc: Set chart size in px.
options_color:
title: Color Pattern
desc: Set custom color pattern.
options_padding:
title: Padding
desc: Change padding for the chart.
point_show:
title: Hide points
desc: Hide points on line chart
pie_label_format:
title: Pie Label Format
desc: Change label format on Pie chart
transition_duration:
title: Duration of Transition
desc: Set duration of transition for chart animation.
api_flow:
title: Flow
desc: Load/Unload data as flowing
api_resize:
title: Resize
desc: Resize chart.
api_data_name:
title: Data Name
desc: Update data names.
api_data_color:
title: Data Color
desc: Update data colors.
api_axis_label:
title: Axis Label
desc: Update axis labels.
api_axis_range:
title: Axis Range
desc: Update axis range.
api_grid_x:
title: X Grid
desc: Update custom x grids.
transform_line:
title: To Line Chart
desc: Transform to line chart.
transform_spline:
title: To Spline Chart
desc: Transform to spline chart.
transform_bar:
title: To Bar Chart
desc: Transform to bar chart.
transform_area:
title: To Area Chart
desc: Transform to area chart.
transform_areaspline:
title: To Area Spline Chart
desc: Transform to area spline chart.
transform_scatter:
title: To Scatter Plot
desc: Transform to scatter plot.
transform_pie:
title: To Pie Chart
desc: Transform to pie chart.
transform_donut:
title: To Donut Chart
desc: Transform to donut chart.
style_region:
title: Style for Region
desc: Set style for regions.
style_grid:
title: Style for Grid
desc: Set style for grids.

157
docs/404.html

@ -0,0 +1,157 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Not Found :(</title>
<style>
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
html {
padding: 30px 10px;
font-size: 20px;
line-height: 1.4;
color: #737373;
background: #f0f0f0;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
html,
input {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body {
max-width: 500px;
_width: 500px;
padding: 30px 20px 50px;
border: 1px solid #b3b3b3;
border-radius: 4px;
margin: 0 auto;
box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
background: #fcfcfc;
}
h1 {
margin: 0 10px;
font-size: 50px;
text-align: center;
}
h1 span {
color: #bbb;
}
h3 {
margin: 1.5em 0 0.5em;
}
p {
margin: 1em 0;
}
ul {
padding: 0 0 0 40px;
margin: 1em 0;
}
.container {
max-width: 380px;
_width: 380px;
margin: 0 auto;
}
/* google search */
#goog-fixurl ul {
list-style: none;
padding: 0;
margin: 0;
}
#goog-fixurl form {
margin: 0;
}
#goog-wm-qt,
#goog-wm-sb {
border: 1px solid #bbb;
font-size: 16px;
line-height: normal;
vertical-align: top;
color: #444;
border-radius: 2px;
}
#goog-wm-qt {
width: 220px;
height: 20px;
padding: 5px;
margin: 5px 10px 0 0;
box-shadow: inset 0 1px 1px #ccc;
}
#goog-wm-sb {
display: inline-block;
height: 32px;
padding: 0 10px;
margin: 5px 0 0;
white-space: nowrap;
cursor: pointer;
background-color: #f5f5f5;
background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
*overflow: visible;
*display: inline;
*zoom: 1;
}
#goog-wm-sb:hover,
#goog-wm-sb:focus {
border-color: #aaa;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
background-color: #f8f8f8;
}
#goog-wm-qt:hover,
#goog-wm-qt:focus {
border-color: #105cb6;
outline: 0;
color: #222;
}
input::-moz-focus-inner {
padding: 0;
border: 0;
}
</style>
</head>
<body>
<div class="container">
<h1>Not found <span>:(</span></h1>
<p>Sorry, but the page you were trying to view does not exist.</p>
<p>It looks like this was the result of either:</p>
<ul>
<li>a mistyped address</li>
<li>an out-of-date link</li>
</ul>
<script>
var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
</script>
<script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
</div>
</body>
</html>

1
docs/CNAME

@ -0,0 +1 @@
c3js.org

3
docs/_footer.haml

@ -0,0 +1,3 @@
%footer
%hr
%p &copy Masayuki Tanaka 2014

4
docs/_index_item.haml

@ -0,0 +1,4 @@
.large-4.columns
%h3 #{data.samples[id].title}
%p.margin-small-bottom #{data.samples[id].desc}
%a.btn.btn-default( href="/samples/#{id}.html" role="button" ) View details &raquo;

4
docs/_index_item_title.haml

@ -0,0 +1,4 @@
%a( href="/examples.html##{id}" name="#{id}" )
%h2<
\#
%span #{name}

3
docs/_reference_item_link.haml

@ -0,0 +1,3 @@
%a( href="##{ id.gsub(/\./, '-') }")< #{ id.gsub(/(api|class)\./, '') }
- if defined? experimental
<span class="secondary label">Experimental</span>

5
docs/_reference_menu_item.haml

@ -0,0 +1,5 @@
%li
- if defined? experimental
= partial :reference_item_link, locals: { id: id, experimental: experimental }
- else
= partial :reference_item_link, locals: { id: id }

34
docs/_sample.haml

@ -0,0 +1,34 @@
.container
%h1.title #{data.samples[id].title}
.chart
#chart
#ace-error
.sourcecode.margin-medium-v.margin-small-h
%h3 # #{id}.js
#javascript-editor.c3-editor
= js_as_plain id
- if defined? other_css
.sourcecode
%h3 # #{other_css}
%pre
%code.css
= css_as_plain other_css
- if defined? other_files
- other_files.each do |f|
.sourcecode
%h3 # #{f}
%pre
%code.html
= data_as_plain f
= partial :footer
= partial :script
= partial :sample_editor, locals: { type: 'javascript' }
= javascript_include_tag "samples/#{id}.js"

36
docs/_sample_editor.haml

@ -0,0 +1,36 @@
= javascript_include_tag "ace/ace.js"
= javascript_include_tag "ace/mode-javascript.js"
= javascript_include_tag "ace/theme-tomorrow.js"
:javascript
var editor = ace.edit('#{type}-editor'),
error = document.getElementById('ace-error');
function debounce(func, wait) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
func.apply(context, args);
};
clearTimeout(timeout);
timeout = setTimeout(later, wait);
};
};
editor.on('change', debounce(function(e) {
try {
eval(editor.getValue());
error.innerHTML = '';
}
catch(e) {
error.innerHTML = e;
}
}, 300));
editor.setOption("maxLines", 100);
editor.setOption("showLineNumbers", false);
editor.setOption("showGutter", false);
editor.setTheme("ace/theme/tomorrow");
editor.getSession().setMode("ace/mode/#{type}");
editor.commands.removeCommand('gotoline') // Disables the override of Command-L

17
docs/_samples_header.haml

@ -0,0 +1,17 @@
.nav
%a( href="/") Home
.page-header.title
%h1 #{data.samples[id].title}
.chart
#chart
.sourcecode
%h3 # #{id}.js
%pre
%code.html.javascript
= js_as_plain id
= partial :script
= javascript_include_tag "samples/#{id}.js"

9
docs/_script.haml

@ -0,0 +1,9 @@
= javascript_include_tag 'jquery-1.11.0.min.js'
-#= javascript_include_tag 'bootstrap.min.js'
= javascript_include_tag 'foundation.min.js'
= javascript_include_tag 'highlight.pack.js'
= javascript_include_tag 'd3-4.13.0.min.js'
= javascript_include_tag 'c3.min.js'
:javascript
hljs.initHighlightingOnLoad();
$(document).foundation();

22
docs/_script_scroll.haml

@ -0,0 +1,22 @@
:javascript
$(function(){
function scrollToHash() {
var hash = document.location.hash,
target = $('.column-content a[href^=' + hash + ']'),
position;
if (target.length) {
position = target.offset().top - 60;
$("html, body").animate({scrollTop:position}, 250, "swing");
}
}
$(window).on('hashchange', scrollToHash);
// When clicked
$('a[href^=#]').click(function(){
document.location.hash = $(this).attr("href");
return false;
});
// When loaded
$(window).trigger('hashchange');
});

2
docs/_sidemenu_item.haml

@ -0,0 +1,2 @@
%li
%a( href="##{ id }") #{ name }

BIN
docs/apple-touch-icon-114x114-precomposed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
docs/apple-touch-icon-144x144-precomposed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
docs/apple-touch-icon-57x57-precomposed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
docs/apple-touch-icon-72x72-precomposed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
docs/apple-touch-icon-precomposed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
docs/apple-touch-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

15
docs/crossdomain.xml

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
<!-- Most restrictive policy: -->
<site-control permitted-cross-domain-policies="none"/>
<!-- Least restrictive policy: -->
<!--
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
-->
</cross-domain-policy>

8
docs/css/bootstrap.min.css vendored

File diff suppressed because one or more lines are too long

174
docs/css/c3.css

@ -0,0 +1,174 @@
/*-- Chart --*/
.c3 svg {
font: 10px sans-serif;
-webkit-tap-highlight-color: transparent; }
.c3 path, .c3 line {
fill: none;
stroke: #000; }
.c3 text {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none; }
.c3-legend-item-tile,
.c3-xgrid-focus,
.c3-ygrid,
.c3-event-rect,
.c3-bars path {
shape-rendering: crispEdges; }
.c3-chart-arc path {
stroke: #fff; }
.c3-chart-arc text {
fill: #fff;
font-size: 13px; }
/*-- Axis --*/
/*-- Grid --*/
.c3-grid line {
stroke: #aaa; }
.c3-grid text {
fill: #aaa; }
.c3-xgrid, .c3-ygrid {
stroke-dasharray: 3 3; }
/*-- Text on Chart --*/
.c3-text.c3-empty {
fill: #808080;
font-size: 2em; }
/*-- Line --*/
.c3-line {
stroke-width: 1px; }
/*-- Point --*/
.c3-circle._expanded_ {
stroke-width: 1px;
stroke: white; }
.c3-selected-circle {
fill: white;
stroke-width: 2px; }
/*-- Bar --*/
.c3-bar {
stroke-width: 0; }
.c3-bar._expanded_ {
fill-opacity: 1;
fill-opacity: 0.75; }
/*-- Focus --*/
.c3-target.c3-focused {
opacity: 1; }
.c3-target.c3-focused path.c3-line, .c3-target.c3-focused path.c3-step {
stroke-width: 2px; }
.c3-target.c3-defocused {
opacity: 0.3 !important; }
/*-- Region --*/
.c3-region {
fill: steelblue;
fill-opacity: .1; }
/*-- Brush --*/
.c3-brush .extent {
fill-opacity: .1; }
/*-- Select - Drag --*/
/*-- Legend --*/
.c3-legend-item {
font-size: 12px; }
.c3-legend-item-hidden {
opacity: 0.15; }
.c3-legend-background {
opacity: 0.75;
fill: white;
stroke: lightgray;
stroke-width: 1; }
/*-- Title --*/
.c3-title {
font: 14px sans-serif; }
/*-- Tooltip --*/
.c3-tooltip-container {
z-index: 10; }
.c3-tooltip {
border-collapse: collapse;
border-spacing: 0;
background-color: #fff;
empty-cells: show;
-webkit-box-shadow: 7px 7px 12px -9px #777777;
-moz-box-shadow: 7px 7px 12px -9px #777777;
box-shadow: 7px 7px 12px -9px #777777;
opacity: 0.9; }
.c3-tooltip tr {
border: 1px solid #CCC; }
.c3-tooltip th {
background-color: #aaa;
font-size: 14px;
padding: 2px 5px;
text-align: left;
color: #FFF; }
.c3-tooltip td {
font-size: 13px;
padding: 3px 6px;
background-color: #fff;
border-left: 1px dotted #999; }
.c3-tooltip td > span {
display: inline-block;
width: 10px;
height: 10px;
margin-right: 6px; }
.c3-tooltip td.value {
text-align: right; }
/*-- Area --*/
.c3-area {
stroke-width: 0;
opacity: 0.2; }
/*-- Arc --*/
.c3-chart-arcs-title {
dominant-baseline: middle;
font-size: 1.3em; }
.c3-chart-arcs .c3-chart-arcs-background {
fill: #e0e0e0;
stroke: none; }
.c3-chart-arcs .c3-chart-arcs-gauge-unit {
fill: #000;
font-size: 16px; }
.c3-chart-arcs .c3-chart-arcs-gauge-max {
fill: #777; }
.c3-chart-arcs .c3-chart-arcs-gauge-min {
fill: #777; }
.c3-chart-arc .c3-gauge-value {
fill: #000;
/* font-size: 28px !important;*/ }
.c3-chart-arc.c3-target g path {
opacity: 1; }
.c3-chart-arc.c3-target.c3-focused g path {
opacity: 1; }

0
docs/css/examples.css

5264
docs/css/foundation.css vendored

File diff suppressed because it is too large Load Diff

1
docs/css/foundation.min.css vendored

File diff suppressed because one or more lines are too long

3
docs/css/gettingstarted.css

@ -0,0 +1,3 @@
#chart5_1 .c3-line-data2 {
stroke-width: 5px;
}

0
docs/css/index.css

423
docs/css/normalize.css vendored

@ -0,0 +1,423 @@
/*! normalize.css v3.0.0 | MIT License | git.io/normalize */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
*/
audio,
canvas,
progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9.
* Hide the `template` element in IE, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none;
}
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background: transparent;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9, Safari 5, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari 5, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9.
*/
img {
border: 0;
}
/**
* Correct overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari 5.
*/
figure {
margin: 1em 40px;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto;
}
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
/* Forms
========================================================================== */
/**
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/
/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
*/
button,
input,
optgroup,
select,
textarea {
color: inherit; /* 1 */
font: inherit; /* 2 */
margin: 0; /* 3 */
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10.
*/
button {
overflow: visible;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Firefox, IE 8+, and Opera
* Correct `select` style inheritance in Firefox.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
input {
line-height: normal;
}
/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`.
*/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* Remove default vertical scrollbar in IE 8/9.
*/
textarea {
overflow: auto;
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold;
}
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}

21
docs/css/reference.css

@ -0,0 +1,21 @@
section p {
margin-bottom: 0;
}
section h5 {
margin-top: 1rem;
}
section code {
padding-left: 0;
}
.sourcecode {
margin-bottom: 1.25rem;
padding: 6px 10px;
background-color: #f4f4f4;
}
.sourcecode pre {
padding: 0;
font-size: 1em;
}
.sourcecode pre code {
background-color: #f4f4f4;
}

0
docs/css/samples/api_axis_label.css

0
docs/css/samples/api_axis_range.css

0
docs/css/samples/api_data_color.css

0
docs/css/samples/api_data_name.css

0
docs/css/samples/api_flow.css

0
docs/css/samples/api_grid_x.css

0
docs/css/samples/api_resize.css

0
docs/css/samples/axes_label.css

0
docs/css/samples/axes_label_position.css

0
docs/css/samples/axes_rotated.css

0
docs/css/samples/axes_x_localtime.css

0
docs/css/samples/axes_x_tick_count.css

0
docs/css/samples/axes_x_tick_culling.css

0
docs/css/samples/axes_x_tick_fit.css

0
docs/css/samples/axes_x_tick_format.css

0
docs/css/samples/axes_x_tick_rotate.css

0
docs/css/samples/axes_x_tick_values.css

0
docs/css/samples/axes_y2.css

0
docs/css/samples/axes_y_padding.css

0
docs/css/samples/axes_y_range.css

0
docs/css/samples/axes_y_tick_format.css

0
docs/css/samples/categorized.css

0
docs/css/samples/chart_area.css

0
docs/css/samples/chart_area_stacked.css

0
docs/css/samples/chart_bar.css

0
docs/css/samples/chart_bar_negative.css

0
docs/css/samples/chart_bar_stacked.css

0
docs/css/samples/chart_combination.css

0
docs/css/samples/chart_donut.css

0
docs/css/samples/chart_gauge.css

0
docs/css/samples/chart_pie.css

0
docs/css/samples/chart_scatter.css

0
docs/css/samples/chart_spline.css

0
docs/css/samples/chart_step.css

0
docs/css/samples/data_color.css

0
docs/css/samples/data_columned.css

0
docs/css/samples/data_json.css

0
docs/css/samples/data_label.css

0
docs/css/samples/data_label_format.css

0
docs/css/samples/data_load.css

0
docs/css/samples/data_name.css

0
docs/css/samples/data_order.css

0
docs/css/samples/data_rowed.css

0
docs/css/samples/data_stringx.css

0
docs/css/samples/data_url.css

0
docs/css/samples/data_xformat.css

0
docs/css/samples/grid_x_lines.css

0
docs/css/samples/grid_y_lines.css

0
docs/css/samples/interaction_zoom.css

7
docs/css/samples/legend_custom.css

@ -0,0 +1,7 @@
.legend span {
width: 33.333333%;
display: inline-block;
text-align: center;
cursor: pointer;
color: white;
}

0
docs/css/samples/legend_position.css

0
docs/css/samples/options_color.css

0
docs/css/samples/options_gridline.css

0
docs/css/samples/options_legend.css

0
docs/css/samples/options_padding.css

0
docs/css/samples/options_size.css

0
docs/css/samples/options_subchart.css

0
docs/css/samples/pie_label_format.css

0
docs/css/samples/point_show.css

6
docs/css/samples/region.css

@ -0,0 +1,6 @@
.c3-region.regionY {
fill: red;
}
.c3-region.regionY2 {
fill: green;
}

0
docs/css/samples/region_timeseries.css

0
docs/css/samples/simple_multiple.css

0
docs/css/samples/simple_regions.css

0
docs/css/samples/simple_xy.css

0
docs/css/samples/simple_xy_multiple.css

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save