Skip to content

Commit 2bc24c8

Browse files
committed
Use local copy of C3 with some accessibility support added
Based on c3js/c3#2317
1 parent c8b6388 commit 2bc24c8

File tree

3 files changed

+9486
-2
lines changed

3 files changed

+9486
-2
lines changed

c3.css

+180
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
/*-- Chart --*/
2+
.c3 svg {
3+
font: 10px sans-serif;
4+
-webkit-tap-highlight-color: transparent; }
5+
6+
.c3 path, .c3 line {
7+
fill: none;
8+
stroke: #000; }
9+
10+
.c3 text {
11+
-webkit-user-select: none;
12+
-moz-user-select: none;
13+
user-select: none; }
14+
15+
.c3-legend-item-tile,
16+
.c3-xgrid-focus,
17+
.c3-ygrid,
18+
.c3-event-rect,
19+
.c3-bars path {
20+
shape-rendering: crispEdges; }
21+
22+
.c3-chart-arc path {
23+
stroke: #fff; }
24+
25+
.c3-chart-arc rect {
26+
stroke: white;
27+
stroke-width: 1; }
28+
29+
.c3-chart-arc text {
30+
fill: #fff;
31+
font-size: 13px; }
32+
33+
/*-- Axis --*/
34+
/*-- Grid --*/
35+
.c3-grid line {
36+
stroke: #aaa; }
37+
38+
.c3-grid text {
39+
fill: #aaa; }
40+
41+
.c3-xgrid, .c3-ygrid {
42+
stroke-dasharray: 3 3; }
43+
44+
/*-- Text on Chart --*/
45+
.c3-text.c3-empty {
46+
fill: #808080;
47+
font-size: 2em; }
48+
49+
/*-- Line --*/
50+
.c3-line {
51+
stroke-width: 1px; }
52+
53+
/*-- Point --*/
54+
.c3-circle._expanded_ {
55+
stroke-width: 1px;
56+
stroke: white; }
57+
58+
.c3-selected-circle {
59+
fill: white;
60+
stroke-width: 2px; }
61+
62+
/*-- Bar --*/
63+
.c3-bar {
64+
stroke-width: 0; }
65+
66+
.c3-bar._expanded_ {
67+
fill-opacity: 1;
68+
fill-opacity: 0.75; }
69+
70+
/*-- Focus --*/
71+
.c3-target.c3-focused {
72+
opacity: 1; }
73+
74+
.c3-target.c3-focused path.c3-line, .c3-target.c3-focused path.c3-step {
75+
stroke-width: 2px; }
76+
77+
.c3-target.c3-defocused {
78+
opacity: 0.3 !important; }
79+
80+
/*-- Region --*/
81+
.c3-region {
82+
fill: steelblue;
83+
fill-opacity: .1; }
84+
85+
/*-- Brush --*/
86+
.c3-brush .extent {
87+
fill-opacity: .1; }
88+
89+
/*-- Select - Drag --*/
90+
/*-- Legend --*/
91+
.c3-legend-item {
92+
font-size: 12px; }
93+
94+
.c3-legend-item-hidden {
95+
opacity: 0.15; }
96+
97+
.c3-legend-background {
98+
opacity: 0.75;
99+
fill: white;
100+
stroke: lightgray;
101+
stroke-width: 1; }
102+
103+
/*-- Title --*/
104+
.c3-title {
105+
font: 14px sans-serif; }
106+
107+
/*-- Tooltip --*/
108+
.c3-tooltip-container {
109+
z-index: 10; }
110+
111+
.c3-tooltip {
112+
border-collapse: collapse;
113+
border-spacing: 0;
114+
background-color: #fff;
115+
empty-cells: show;
116+
-webkit-box-shadow: 7px 7px 12px -9px #777777;
117+
-moz-box-shadow: 7px 7px 12px -9px #777777;
118+
box-shadow: 7px 7px 12px -9px #777777;
119+
opacity: 0.9; }
120+
121+
.c3-tooltip tr {
122+
border: 1px solid #CCC; }
123+
124+
.c3-tooltip th {
125+
background-color: #aaa;
126+
font-size: 14px;
127+
padding: 2px 5px;
128+
text-align: left;
129+
color: #FFF; }
130+
131+
.c3-tooltip td, .c3-tooltip th[scope='row'] {
132+
font-size: 13px;
133+
padding: 3px 6px;
134+
background-color: #fff;
135+
border-left: 1px dotted #999;
136+
color: black;
137+
font-weight: normal; }
138+
139+
.c3-tooltip td > span, .c3-tooltip th[scope='row'] > span {
140+
display: inline-block;
141+
width: 10px;
142+
height: 10px;
143+
margin-right: 6px; }
144+
145+
.c3-tooltip td.value {
146+
text-align: right; }
147+
148+
/*-- Area --*/
149+
.c3-area {
150+
stroke-width: 0;
151+
opacity: 0.2; }
152+
153+
/*-- Arc --*/
154+
.c3-chart-arcs-title {
155+
dominant-baseline: middle;
156+
font-size: 1.3em; }
157+
158+
.c3-chart-arcs .c3-chart-arcs-background {
159+
fill: #e0e0e0;
160+
stroke: #FFF; }
161+
162+
.c3-chart-arcs .c3-chart-arcs-gauge-unit {
163+
fill: #000;
164+
font-size: 16px; }
165+
166+
.c3-chart-arcs .c3-chart-arcs-gauge-max {
167+
fill: #777; }
168+
169+
.c3-chart-arcs .c3-chart-arcs-gauge-min {
170+
fill: #777; }
171+
172+
.c3-chart-arc .c3-gauge-value {
173+
fill: #000;
174+
/* font-size: 28px !important;*/ }
175+
176+
.c3-chart-arc.c3-target g path {
177+
opacity: 1; }
178+
179+
.c3-chart-arc.c3-target.c3-focused g path {
180+
opacity: 1; }

0 commit comments

Comments
 (0)