<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Apache ECharts on OINK</title>
		<link>https://oink.pgsty.com/docs/advanced/echarts/</link>
		<description>Recent content in Apache ECharts on OINK</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<atom:link href="https://oink.pgsty.com/docs/advanced/echarts/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>ECharts gallery</title>
				<link>https://oink.pgsty.com/docs/advanced/echarts/gallery/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://oink.pgsty.com/docs/advanced/echarts/gallery/</guid>
				<description>&lt;p&gt;These examples use only structured YAML. They require no callback code and&#xA;therefore stay within the simplest ECharts authoring and review boundary. The&#xA;numbers are illustrative.&lt;/p&gt;&#xA;&lt;h2 id=&#34;reuse-a-dataset&#34;&gt;Reuse a dataset&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#reuse-a-dataset&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;ECharts &lt;code&gt;dataset&lt;/code&gt; keeps records separate from their visual encoding. Series can&#xA;refer to dimensions by name, which is easier to review than repeating parallel&#xA;arrays.&lt;/p&gt;&#xA;&lt;h2 id=&#34;bar-chart-from-a-dataset&#34;&gt;Bar chart from a dataset&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#bar-chart-from-a-dataset&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-go-html-template&#34; data-lang=&#34;go-html-template&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;echarts&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;320px&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;}}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;dataset:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  source:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    - [stage, minutes]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    - [Draft, 18]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    - [Review, 11]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    - [Publish, 4]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;xAxis: { type: category }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;yAxis: { type: value, name: Minutes }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;series:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  - type: bar&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    encode: { x: stage, y: minutes }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;echarts&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;}}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The example shows the median duration falling from 18 minutes for drafting to&#xA;four minutes for publication.&lt;/p&gt;</description>
			</item>
			<item>
				<title>ECharts callbacks and trusted code</title>
				<link>https://oink.pgsty.com/docs/advanced/echarts/callbacks/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://oink.pgsty.com/docs/advanced/echarts/callbacks/</guid>
				<description>&lt;p&gt;Most ECharts options should remain declarative JSON or YAML. Some valid options,&#xA;including custom formatters and data-dependent styles, require functions. Oink&#xA;supports those cases through fenced JavaScript blocks and &lt;code&gt;$fn:name&lt;/code&gt; references.&lt;/p&gt;&#xA;&lt;h2 id=&#34;trusted-author-boundary&#34;&gt;Trusted-author boundary&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#trusted-author-boundary&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Callback code runs in every visitor&amp;rsquo;s browser with the page&amp;rsquo;s origin and normal&#xA;JavaScript privileges. Oink safely serializes structured chart options, but it&#xA;does not sandbox author-supplied callbacks. Only trusted project authors should&#xA;add or review them.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
