<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[LQVinh - ARROW Technologies Blog]]></title><description><![CDATA[Trang tổng hợp các kiến thức về lập trình]]></description><link>https://blog.arrow-tech.vn/</link><image><url>https://blog.arrow-tech.vn/favicon.png</url><title>LQVinh - ARROW Technologies Blog</title><link>https://blog.arrow-tech.vn/</link></image><generator>Ghost 5.81</generator><lastBuildDate>Thu, 12 Mar 2026 04:53:16 GMT</lastBuildDate><atom:link href="https://blog.arrow-tech.vn/author/lqvinh/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Vẽ đồ thị sử dụng C3Js]]></title><description><![CDATA[<!--kg-card-begin: markdown--><h2 id="ccbcsdngthvinc3jsvth">C&#xE1;c b&#x1B0;&#x1EDB;c s&#x1EED; d&#x1EE5;ng th&#x1B0; vi&#x1EC7;n C3Js &#x111;&#x1EC3; v&#x1EBD; &#x111;&#x1ED3; th&#x1ECB;</h2>
<h3 id="bc1downloadthvinc3jsminhthttpsgithubcomc3jsc3releaseslatest">B&#x1B0;&#x1EDB;c 1: Download th&#x1B0; vi&#x1EC7;n C3Js m&#x1EDB;i nh&#x1EA5;t: [<a href="https://github.com/c3js/c3/releases/latest?ref=blog.arrow-tech.vn">https://github.com/c3js/c3/releases/</a></h3>]]></description><link>https://blog.arrow-tech.vn/su-dung-c3js-de-ve-do-thi/</link><guid isPermaLink="false">63915acd7a2f410001205da9</guid><dc:creator><![CDATA[LQVinh]]></dc:creator><pubDate>Tue, 24 Apr 2018 07:56:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><h2 id="ccbcsdngthvinc3jsvth">C&#xE1;c b&#x1B0;&#x1EDB;c s&#x1EED; d&#x1EE5;ng th&#x1B0; vi&#x1EC7;n C3Js &#x111;&#x1EC3; v&#x1EBD; &#x111;&#x1ED3; th&#x1ECB;</h2>
<h3 id="bc1downloadthvinc3jsminhthttpsgithubcomc3jsc3releaseslatest">B&#x1B0;&#x1EDB;c 1: Download th&#x1B0; vi&#x1EC7;n C3Js m&#x1EDB;i nh&#x1EA5;t: [<a href="https://github.com/c3js/c3/releases/latest?ref=blog.arrow-tech.vn">https://github.com/c3js/c3/releases/latest</a>]</h3>
<p>Load c&#xE1;c th&#x1B0; vi&#x1EC7;n css v&#xE0; js c&#x1EA7;n thi&#x1EBF;t<br>
<code>&lt;!-- Load c3.css --&gt;</code><br>
<code>&lt;link href=&quot;/path/to/c3.css&quot; rel=&quot;stylesheet&quot;&gt;</code></p>
<p><code>&lt;!-- Load d3.js and c3.js --&gt;</code><br>
<code>&lt;script src=&quot;/path/to/d3.v3.min.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;</code><br>
<code>&lt;script src=&quot;/path/to/c3.min.js&quot;&gt;&lt;/script&gt;</code><br>
<strong>Note</strong>: C&#x1EA7;n ph&#x1EA3;i t&#x1EA3;i v&#xE0; c&#xE0;i &#x111;&#x1EB7;t th&#x1B0; vi&#x1EC7;n D3Js tr&#x1B0;&#x1EDB;c v&#xEC; C3Js &#x111;&#x1B0;&#x1EE3;c vi&#x1EBF;t tr&#xEA;n D3Js</p>
<h3 id="bc2toth">B&#x1B0;&#x1EDB;c 2: T&#x1EA1;o &#x111;&#x1ED3; th&#x1ECB;</h3>
<p>T&#x1EA1;o m&#x1ED9;t element ch&#x1EE9;a &#x111;&#x1ED3; th&#x1ECB;(N&#x1A1;i &#x111;&#x1ED3; th&#x1ECB; hi&#x1EC3;n th&#x1ECB;)<br>
vd: <code>&lt;div id=&quot;chart&quot;&gt;&lt;/div&gt;</code><br>
T&#x1EA1;o &#x111;&#x1ED3; th&#x1ECB; s&#x1EED; d&#x1EE5;ng ph&#x1B0;&#x1A1;ng th&#x1EE9;c generate()</p>
<blockquote>
<p>var chart = c3.generate({<br>
bindto: &apos;#chart&apos;,<br>
data: {<br>
columns: [<br>
[&apos;data1&apos;, 30, 200, 100, 400, 150, 250],<br>
[&apos;data2&apos;, 50, 20, 10, 40, 15, 25]<br>
]<br>
}<br>
});</p>
</blockquote>
<p><strong>&#x1EDE; &#x111;&#xE2;y ta ch&#xFA; &#xFD; &#x111;&#x1EBF;n 1 s&#x1ED1; &#x111;i&#x1EC3;m sau:</strong></p>
<ul>
<li>bindto: Ch&#x1EC9; ra &#x111;&#x1ED3; th&#x1ECB; &#x111;&#x1B0;&#x1EE3;c v&#x1EBD; &#x1EDF; &#x111;&#xE2;u( Trong vd l&#xE0; th&#x1EBB; div c&#xF3; id=&quot;chart&quot;)</li>
<li>data: ch&#x1EE9;a data m&#xE0; ta d&#xF9;ng &#x111;&#x1EC3; v&#x1EBD; &#x111;&#x1ED3; th&#x1ECB;</li>
<li>columns: T&#x1B0;&#x1A1;ng &#x1EE9;ng l&#xE0; c&#xE1;c &#x111;&#x1B0;&#x1EDD;ng ho&#x1EB7;c c&#x1ED9;t trong &#x111;&#x1ED3; th&#x1ECB;</li>
</ul>
<h3 id="bc3customththeomun">B&#x1B0;&#x1EDB;c 3: Custom &#x110;&#x1ED3; th&#x1ECB; theo &#xFD; mu&#x1ED1;n</h3>
<ol>
<li>Additional Axis:</li>
</ol>
<ul>
<li>Th&#xEA;m 1 tr&#x1EE5;c Y trong &#x111;&#x1ED3; th&#x1ECB;</li>
</ul>
<blockquote>
<p>var chart = c3.generate({<br>
bindto: &apos;#chart&apos;,<br>
data: {<br>
columns: [<br>
[&apos;data1&apos;, 30, 200, 100, 400, 150, 250],<br>
[&apos;data2&apos;, 50, 20, 10, 40, 15, 25]<br>
],<br>
axes: {<br>
data2: &apos;y2&apos; // ADD<br>
}<br>
},<br>
axis: {<br>
y2: {<br>
show: true // ADD<br>
}<br>
}<br>
});</p>
</blockquote>
<ul>
<li>&#x1EDE; &#x111;&#xE2;y ta th&#xEA;m m&#x1ED9;t tr&#x1EE5;c y2 v&#x1EDB;i data l&#xE0; data2</li>
</ul>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>