|
|
发表于 2017-1-28 22:43:30
|
显示全部楼层
本帖最后由 ipakk 于 2017-1-28 22:46 编辑 # N# o! ^* n( A* B$ m) ]' D; J
( Z1 V! N/ N! y* f/ U
向右的柱状图- <div id="bar-chart" class="graphic"></div>
复制代码 : U& v2 T; M8 }# L1 [
脚注, m K6 X3 d2 W
(刚观察CNN某网站的源码和框架偶然发现:Refugees from countries targeted in Trump's order,源码和框架在这里看:- <!DOCTYPE html>$ Z0 `& R; C) H' i$ D$ C
- <!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]-->
$ `' S4 u! D0 H - <!--[if IE 8]> <html class="lt-ie9"> <![endif]-->5 I* z9 h! c" g1 E0 D y
- <!--[if IE 9 ]> <html class="ie9" lang="en-US"> <![endif]-->' Y; k; Y% Y& s7 {4 F0 \
- <!--[if (gt IE 9)|!(IE)]><!--> <html lang="en-US"> <!--<![endif]-->5 m! u2 s1 i- Z ?' Z
- <head>5 w* P1 o/ D6 ~
7 S0 F3 R4 k m) K1 v; E. Z& C# M U- <meta charset="utf-8"># U: o. \. {: U6 p( C( S, ^
- <meta name="robots" content="noindex">
8 Z& d- v" a7 m - <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 @+ @" R) r5 i2 U$ V - <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">& z& f/ |! w5 u* j: v
- 0 H% T" |' F; ?
- <title>CNN : Graphic : Refugees from countries targeted in Trump's order</title>4 a; B+ c4 A1 T% q: r( I
0 ?% M1 N k+ K# Q6 }- <meta name="title" content="Refugees from countries targeted in Trump's order">
# C w$ x8 r( `2 D - <meta name="description" content="">' K6 l: C6 \; r8 J
- <meta name="keywords" content="">
2 z/ a8 O- Q Y - <meta name="news_keywords" content="">- ~. j- K* ^1 l Y* ~4 d! S
- <meta name="section" content="">
& K7 i% q3 D: C5 } - <meta name="source" content="CNN">
: \7 e! N4 m# d" j- g+ ?4 S - <meta name="subsection" content="">$ m2 `0 W5 A, H( V% x4 F+ T
- <meta name="application-name" content="CNN">9 X& \% V( g) }. Y4 o( d* o, z* b
- 4 D6 ?. k9 L: ^$ h' b# o# Q' R& }! b
- <!-- Facebook settings -->
$ K0 H: [6 v6 `$ ^* m, J4 ^. } - <meta property="og:description" content="">
8 F& R6 M# m* j" @% H3 ] f' \8 D - <meta property="og:image" content="">: M. z/ s# v% y3 U
- <meta property="og:type" content="">
7 f6 n! c2 u n7 i5 y - <meta property="og:title" content="Refugees from countries targeted in Trump's order">
9 c' L* f- \* e. N" U - <meta property="og:url" content="">. g, ~: ^# b+ m& } I( h/ I
- <meta property="fb:admins" content="690014395">/ I3 ?+ D- U$ r9 ~4 V% |
- <meta property="fb:app_id" content="80401312489">
* S* Z7 m( N& p. Q& Q
! b7 N2 D5 p. C) T& }- <!-- Twitter card settings -->
) R z/ l7 V3 I s2 |; P5 t7 J - <meta name="twitter:card" content="summary_large_image">
: f5 V8 y8 Y {* K0 X - <meta name="twitter:site" content="@cnn">
/ a" P+ ~% ]3 U4 k- Q - <meta name="twitter:site:id" content="759251">
! B1 h2 `$ | H( ]' j - <meta name="twitter:creator" content="@cnn">
2 u3 w. l, e; D" x, s - <meta name="twitter:title" content="Refugees from countries targeted in Trump's order">
; x" `) U: N. I2 U; { - <meta name="twitter:description" content="">" a D+ O/ K6 h, r
- * D* ~- \: ^; H9 `# J* D2 R
- <link rel="canonical" href="">3 i* }4 o+ U5 Z9 V
- <link rel="shortcut icon" href="//cnn.com/favicon.ie9.ico">) @& H9 h3 e8 I" |1 h2 y$ ~% M% P
- <link rel="apple-touch-icon" href="//i.cdn.turner.com/cnn/.e/img/3.0/global/misc/apple-touch-icon.png">+ Q2 g; F1 D# O) ]
- <link rel="stylesheet" type="text/css" href="css/graphic-header.css?1485524128" />
+ \. B" ?) D2 F' \ - 3 e+ n$ A% | |, g: [. ^; H9 x
- <base target="_blank">- X: k: M1 G! h
: F/ t, a% O# h- </head>. O: S8 N1 s$ s2 a' i8 A f. V( |0 T
- : Z* z5 r- W, l" w! w) ~) J5 g
- <body>/ b9 J' `% x8 ?+ C" B
- <header>
! Z3 | q+ G6 i# ^ - <!-- javascripts -->
+ v' h0 @# r' C# {7 n4 } -
. z" u6 M6 M) a8 R' y - <script type="text/javascript" src="js/graphic-header.js?1485524128"></script>
8 q* e" v6 s) a4 z- W9 Q! w' p - <script type="text/javascript" src="//z.cdn.turner.com/cnn/.e/js/libs/jquery-1.9.1.min.js"></script>
. P. Q" ~9 H' C9 i/ ^3 X - </header>: |- R& U8 j1 w# \* T7 a
0 L+ T" V' n7 b3 F5 ^8 ]5 h- <section>, b1 F5 r6 B7 j2 K* f
2 U% k+ o' e# ^" [# o: y- 0 Z* y, v$ w& [" h9 Z: v1 c) P
- <div id="meta">
: }" A6 }* ?8 I, l - <h1 class="hed">Refugees from countries targeted in Trump's order</h1>
9 r6 ?/ r7 ?# V% e( n% o - <h2 class="dek">In fiscal 2016, US admitted 36,722 refugees from Iraq, Iran, Syria, Yemen, Sudan, Somalia and Libya.</h2>
- o4 G8 ?4 c: K+ J - </div>' \) r: d. l' t# l* a3 i$ h
5 I. k# m }# c |! a/ _- <div id="bar-chart" class="graphic"></div>
/ c6 H3 [; @4 m ]: J5 m P
# R& H/ m8 }. t6 f5 Q0 B- <div id="footer">
9 I: f4 K5 U2 z. |. r - 1 `1 E& `6 N- K @& x, s3 N
- <p class="source">Source: Refugee Processing Center / US State Department’s Bureau of Population, Refugees and Migration</p># p+ j; I! ~1 r; A+ Q+ k- L5 Z
- </div>/ Y- Y7 f, L l- P* l* v9 L3 i. Q
5 i* _- F, e4 ]4 K/ o. @. L/ w* H- <script type="text/javascript">2 m3 ]+ f# V$ p1 T* X) G
- var DATA = [{"label": "Syria", "amt": "12587"}, {"label": "Iraq", "amt": "9880.0"}, {"label": "Somalia", "amt": "9020"}, {"label": "Iran", "amt": "3750.0"}, {"label": "Sudan", "amt": "1458"}, {"label": "Yemen", "amt": "26"}, {"label": "Libya", "amt": "1"}];- `% u$ N# x0 ~
- </script>
% F6 C, V) N% i6 _! e - 2 t2 W# {. V7 H
- - G2 G$ n6 }6 ?5 c# v
- </section>
2 l/ [% s' G5 D - - `* W5 i3 e) A, {( Q
- <footer>
1 a7 i0 X5 \+ Z1 x9 A$ c0 q: r7 ^ - <!-- javascripts -->- N8 E' }% |. o; A
- <script src="//z.cdn.turner.com/cnn/.e/interactive/js/lib/vendor/pym/pym.v1.min.js"></script>+ {, E4 P0 @) | K) \7 E
- <script src="//z.cdn.cnn.com/cnn/.e/interactive/js/lib/vendor/d3/d3-4.3.0-min.js"></script>
' X* E" z* \9 ^ - . p" p: ^( Y- { m' ^' `4 F
-
7 Q# }" y' M) T/ r4 W: ^ -
4 r* ~6 b* k0 h- G -
$ F- D, D# V6 h8 [0 V% G" k - 5 X# O5 m! Q' s1 W9 C
- <script type="text/javascript" src="js/graphic-footer.js?1485524128"></script>
# s1 ?# I$ q2 K4 N& ] - / R+ J+ n' V2 {1 A4 I# c* a
- </footer>* H1 V, L4 u2 c) D* N
- </body>
0 v# K+ G, {1 D2 q* r$ Y% a; l - </html>
复制代码 0 `1 @( B8 S, T4 u2 O
7 |$ B0 X( x# g& r" ^7 x1 I
! G6 j( K, x; G3 T$ k. c' \, G; }
好像还要画图,用什么工具画? 有谁知道吗,可否推荐一个比较好的工具,谢谢! |
|