<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mike</title>
    <description>The latest articles on DEV Community by Mike (@mikeschultz).</description>
    <link>https://dev.to/mikeschultz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F111708%2F6170b2b7-94e3-4576-8a27-3a18948d5404.png</url>
      <title>DEV Community: Mike</title>
      <link>https://dev.to/mikeschultz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mikeschultz"/>
    <language>en</language>
    <item>
      <title>An update: Still coding on the road. Now Off-Grid.</title>
      <dc:creator>Mike</dc:creator>
      <pubDate>Tue, 19 Jan 2021 05:59:26 +0000</pubDate>
      <link>https://dev.to/mikeschultz/an-update-still-coding-on-the-road-now-off-grid-44p9</link>
      <guid>https://dev.to/mikeschultz/an-update-still-coding-on-the-road-now-off-grid-44p9</guid>
      <description>&lt;p&gt;So it's been a while since I last posted this: &lt;a href="https://dev.toCoding%20Out%20of%20a%20Van%20in%20New%20Zealand"&gt;https://dev.to/mikeschultz/coding-out-of-a-van-in-new-zealand-kk1&lt;/a&gt;. More than a year has gone by, a pandemic, world chaos, and a lot of us are now working remotely...so I figured I'd give an update.&lt;/p&gt;

&lt;p&gt;Since being a digital nomad overseas has been on hold at the moment, I've since then moved back to the USA and converted an SUV into a home/work/adventure vehicle. Still working full-time, still maximizing my free time enjoying the outdoors and taking pictures. So here's a little breakdown of how I'm able to live and work out of it!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Office
&lt;/h2&gt;

&lt;p&gt;The number one question I always get: "How are you able to work on the road full time?"&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S-AThvkJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/44o3imue0qr2t9fn4un9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S-AThvkJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/44o3imue0qr2t9fn4un9.jpg" alt="My office" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the passenger seat, I've rigged up a removable desk using a dash mount made specifically for my vehicle, numerous ball joints and clamps, and a trip to home depot to cut some wood. I use that 12.9" iPad Pro as a second monitor via sidecar on my MacBook Pro. It's fairly solid, and gives a decent amount of rest support!&lt;/p&gt;

&lt;h2&gt;
  
  
  Power
&lt;/h2&gt;

&lt;p&gt;"Ok but does your car battery drain?" Since I live out of this vehicle I need a lot of power for my computer, fridge, and all my camera gear. Instead of just relying on the car battery, I've installed a full solar system that you would find on one of those "van life" builds. 300 Watts of solar power charges up my 100AH Lithium Battery. The 1000W inverter allows me to plug my household supplies and electronics. As an added bonus, the solar controller also charges my car's alternator battery if it ever dies!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RRDNWmof--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/ii1gpf1tmxkh37k20lxz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RRDNWmof--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/ii1gpf1tmxkh37k20lxz.jpg" alt="Solar power" width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HXRTF5rJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/t5jd861wb7tpxgn7r1u1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HXRTF5rJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/t5jd861wb7tpxgn7r1u1.jpg" alt="Solar on roof" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've mounted the 3x100 Watt solar panels on top of my roof top tent. And yes, having the tent open increases the efficiency of the panels when angled towards the sun!&lt;/p&gt;

&lt;h2&gt;
  
  
  Internet
&lt;/h2&gt;

&lt;p&gt;For internet, I tether off of my cellular AT&amp;amp;T and Verizon unlimited plans, depending on the strength of the signal. I typically use an app called "Gaia" to not only find places to camp, but to also gauge cell signal strength. I tent to stay close to towns during the work week, and have successful luck with getting 20-30mb/s consistently. And yes, I do have zoom meetings daily and rarely have any connectivity issues.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2s9fdrva--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/vut83rk5zd7uuwtna9z9.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2s9fdrva--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/vut83rk5zd7uuwtna9z9.PNG" alt="Gaia" width="800" height="1732"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also have a cellular booster on top of the roof to give me a couple bars more in rural areas.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X7lvkSLb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/kcfjzuxoqgan64201ka6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X7lvkSLb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/kcfjzuxoqgan64201ka6.png" alt="Cell Booster" width="800" height="1074"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that's all of the necessities I need to do my work on the road. &lt;/p&gt;

&lt;h2&gt;
  
  
  As for the rest of it...
&lt;/h2&gt;

&lt;p&gt;I know "living on the road" is always a loaded topic: Showers, bathrooms, cooking, fridge, staying safe, etc, but I wanted to just focus on the working on the road aspect of it for this article. If you are interested in more, I have been posting a fair amount of my road life content on my &lt;a href="https://www.instagram.com/goingfarther"&gt;Instagram&lt;/a&gt; and &lt;a href="https://vm.tiktok.com/ZMJ3MYcCD/"&gt;TikTok&lt;/a&gt; recently with a bunch of answers and pictures. (Say hi if you do land on there!)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.tiktok.com/@goingfarther/video/6917616026544803077?_d=secCgYIASAHKAESMgowlzE5EJC8kexiE7Z8HuxQCV%2B0InTOExE2bdhOFiPcvHQcdWhGbTUX6P1k9eblAjJ2GgA%3D&amp;amp;language=en&amp;amp;sec_uid=MS4wLjABAAAAM1qwpdn9eV9co94hB8GeFqxvl162EM88eZfldMNnDzX7kWqNhirITH3x0pRIkZ7-&amp;amp;sec_user_id=MS4wLjABAAAAM1qwpdn9eV9co94hB8GeFqxvl162EM88eZfldMNnDzX7kWqNhirITH3x0pRIkZ7-&amp;amp;share_author_id=6750114366282499077&amp;amp;share_link_id=E92B4763-2AE3-4FEB-9EA5-2C161C709215&amp;amp;tt_from=copy&amp;amp;u_code=d909kf1a2be64f&amp;amp;user_id=6750114366282499077&amp;amp;utm_campaign=client_share&amp;amp;utm_medium=ios&amp;amp;utm_source=copy&amp;amp;source=h5_m"&gt;Quick Tour on TikTok&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for the read and happy to answer questions on here as well!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>career</category>
      <category>remotework</category>
    </item>
    <item>
      <title>ZingChart Angular Examples</title>
      <dc:creator>Mike</dc:creator>
      <pubDate>Mon, 10 Feb 2020 18:24:49 +0000</pubDate>
      <link>https://dev.to/mikeschultz/zingchart-angular-examples-4o12</link>
      <guid>https://dev.to/mikeschultz/zingchart-angular-examples-4o12</guid>
      <description>&lt;p&gt;Whether you are looking for a solution to quickly create a chart, or you are looking to build complex dashboards within your Angular application, &lt;a href="https://www.zingchart.com/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=angular"&gt;ZingChart's&lt;/a&gt; new Angular component is the perfect solution for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;To help get you started with our library in your Angular application, check out the first post in this series - &lt;a href="https://blog.zingchart.com/how-to-create-charts-in-angular/"&gt;How to Create Charts in Angular&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you run into any issues using ZingChart, its component or any of the 35+ chart types, don't hesitate to reach out to &lt;a href="mailto:support@zingchart.com"&gt;support@zingchart.com&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Customized Charts
&lt;/h2&gt;

&lt;p&gt;The ZingChart Angular component has the same capabilities that the regular library has, allowing you to fully customize charts to your brand, like this Angular Gauge Chart!&lt;br&gt;
&lt;iframe src="https://stackblitz.com/edit/zingchart-angular-example-gauge?view=preview" width="100%" height="500"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;a href="https://stackblitz.com/edit/zingchart-angular-example-gauge"&gt;https://stackblitz.com/edit/zingchart-angular-example-gauge&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Listening to Events
&lt;/h2&gt;

&lt;p&gt;We can attach a listener to any of ZingChart's events and use that information outside of ZingChart, in our Angular application. The following example shows how we can create a custom tooltip that is external to the chart.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://stackblitz.com/edit/zingchart-angular-example-events?view=preview" width="100%" height="500"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;a href="https://stackblitz.com/edit/zingchart-angular-example-events"&gt;https://stackblitz.com/edit/zingchart-angular-example-events&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Binding
&lt;/h2&gt;

&lt;p&gt;By data binding a chart's configuration, we can control the data and how it's appearance from Angular. The dropdown demonstrates different datasets being loaded into our chart with our &lt;code&gt;data&lt;/code&gt; attribute being bound via Angular.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://stackblitz.com/edit/zingchart-angular-example-data-binding?view=preview" width="100%" height="500"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;a href="https://stackblitz.com/edit/zingchart-angular-example-data-binding"&gt;https://stackblitz.com/edit/zingchart-angular-example-data-binding&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  35+ Chart Types
&lt;/h2&gt;

&lt;p&gt;The Angular component is compatible with &lt;a href="https://www.zingchart.com/gallery?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=angular"&gt;all chart types&lt;/a&gt; that ZingChart offers, including plugins such as maps!&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://stackblitz.com/edit/zingchart-angular-example-map?view=preview" width="100%" height="500"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;a href="https://stackblitz.com/edit/zingchart-angular-example-map"&gt;https://stackblitz.com/edit/zingchart-angular-example-map&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>angular</category>
      <category>dataviz</category>
    </item>
    <item>
      <title>Creating Charts in Angular</title>
      <dc:creator>Mike</dc:creator>
      <pubDate>Thu, 06 Feb 2020 18:14:09 +0000</pubDate>
      <link>https://dev.to/zingchartinc/creating-charts-in-angular-4gen</link>
      <guid>https://dev.to/zingchartinc/creating-charts-in-angular-4gen</guid>
      <description>&lt;p&gt;We at ZingChart have been hard at work, creating a TypeScript Definition File and Angular component for our library!&lt;/p&gt;

&lt;h2&gt;
  
  
  ZingChart — The last data visualization library you’ll need
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.zingchart.com/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=angular" rel="noopener noreferrer"&gt;ZingChart&lt;/a&gt; is one of the original JavaScript charting libraries, and continues to innovate and improve on its feature set. With over 35 different chart types, a rich API of methods/events to integrate with, and a dedicated support team, ZingChart provides an all-in-one solution for your data visualization needs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4qlobmhgurs4t6guoa5i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4qlobmhgurs4t6guoa5i.png" alt="ZingChart has over 35 different base chart types and hundreds of configurations&amp;lt;br&amp;gt;
"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;ZingChart has over 35 different base chart types and hundreds of configurations&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Typescript Definition File
&lt;/h2&gt;

&lt;p&gt;We have created a TypeScript definition file for the ZingChart library! All of the typings for our JSON configuration are now readily available, with descriptions for each attribute. This allows our developers who use TypeScript in their applications to validate their chart configurations with ease. This works well with IDEs such as Visual Studio Code that support type-ahead with descriptions. It is automatically included in our &lt;code&gt;zingchart-angular&lt;/code&gt; component. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fwq7hu3ttvp3fdmhadf2a.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fwq7hu3ttvp3fdmhadf2a.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting started with Angular
&lt;/h2&gt;

&lt;p&gt;If you don’t have an Angular Application, you can easily set one up with the &lt;a href="https://angular.io/cli" rel="noopener noreferrer"&gt;angular-cli&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ ng new my-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;First we add the package to our Angular Application via NPM:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ npm i zingchart-angular&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We then add our chart module to our App's module.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;BrowserModule&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/platform-browser&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NgModule&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ZingchartAngularModule&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;zingchart-angular&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;AppComponent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./app.component&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;NgModule&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;declarations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nx"&gt;AppComponent&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;imports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nx"&gt;BrowserModule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;ZingchartAngularModule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;bootstrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;AppComponent&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AppModule&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside of the &lt;code&gt;app.component.ts&lt;/code&gt;, we define the look and feel of our chart. We can use ZingChart's TypeScript Definition file to validate the JSON config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app-root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./app.component.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;styleUrls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./app.component.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AppComponent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;zing-app&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;zingchart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;graphset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;line&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;series&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
      &lt;span class="na"&gt;values&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}]&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, we add our a chart into our markup inside of &lt;code&gt;app.component.html&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;zingchart-angular&lt;/span&gt; &lt;span class="na"&gt;[config]=&lt;/span&gt;&lt;span class="s"&gt;"config"&lt;/span&gt; &lt;span class="na"&gt;[height]=&lt;/span&gt;&lt;span class="s"&gt;"500"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/zingchart-angular&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fvx3lo8ylmpwtiwnlbv4f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fvx3lo8ylmpwtiwnlbv4f.png" alt="https://stackblitz.com/edit/zingchart-angular-helloworld"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;&lt;a href="https://stackblitz.com/edit/zingchart-angular-helloworld" rel="noopener noreferrer"&gt;https://stackblitz.com/edit/zingchart-angular-helloworld&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That was it! Only a few lines of code, and we have a fully reactive chart that updates when your data does.&lt;/p&gt;
&lt;h2&gt;
  
  
  Reactivity
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;zingchart-angular&lt;/code&gt; component is reactive to all of its properties — from the &lt;a href="https://www.notion.so/zingsoft/Create-Charts-in-Angular-4b0ed60abc0c4654a810e540752708a2#1f1a27fd0bd84066ba86c036e860537b" rel="noopener noreferrer"&gt;chart configuration&lt;/a&gt; to the data. If any changes are sent to the component, the chart is re-rendered automatically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fvemhhvzp2txrj8hdxzqk.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fvemhhvzp2txrj8hdxzqk.gif" alt="https://stackblitz.com/edit/zingchart-angular-reactivity"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://stackblitz.com/edit/zingchart-angular-reactivity" rel="noopener noreferrer"&gt;https://stackblitz.com/edit/zingchart-angular-reactivity&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Events and Methods — Tying your app together with ZingChart
&lt;/h2&gt;

&lt;p&gt;The revised ZingChart component is all about connectivity to your Angular component. Events are automatically bound to the function you provide via props, and all available &lt;a href="https://www.notion.so/zingsoft/Create-Charts-in-Angular-4b0ed60abc0c4654a810e540752708a2#cf40be76ac6549a3890f2eebd700f61d" rel="noopener noreferrer"&gt;ZingChart methods&lt;/a&gt; are available when you access a specific component via refs.&lt;/p&gt;
&lt;h3&gt;
  
  
  Events
&lt;/h3&gt;

&lt;p&gt;By binding a function to a known ZingChart event prop, we can perform custom actions when a chart emits an event. In the example below the event &lt;code&gt;node_mouseover&lt;/code&gt; is emitted and its contents are displayed.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;zingchart-angular [config]="config" [height]="300" (node_mouseover)="onNodeMouseover($event)"&amp;gt;&amp;lt;/zingchart-angular&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0l700hwurzbt5llxw7ay.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0l700hwurzbt5llxw7ay.gif" alt="https://stackblitz.com/edit/zingchart-angular-event"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://stackblitz.com/edit/zingchart-angular-event" rel="noopener noreferrer"&gt;https://stackblitz.com/edit/zingchart-angular-event&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I highly recommend checking out all of &lt;a href="https://www.zingchart.com/docs/api/events?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=angular" rel="noopener noreferrer"&gt;ZingChart's events&lt;/a&gt; to see what is available to you.&lt;/p&gt;
&lt;h3&gt;
  
  
  Methods
&lt;/h3&gt;

&lt;p&gt;Methods can be called when a ref is given to the component, and a known method is called from the instance of the component. Below is an example of dynamically adding a plot, from a custom button created in Angular.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;zingchart&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;angular&lt;/span&gt; &lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="nx"&gt;chart1&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;config&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/zingchart-angular&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
    &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AppComponent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="p"&gt;...&lt;/span&gt;

    &lt;span class="nf"&gt;obtainData&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getdata&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0io36qs65s1iqgujbhld.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0io36qs65s1iqgujbhld.gif" alt="https://stackblitz.com/edit/zingchart-angular-method"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://stackblitz.com/edit/zingchart-angular-method" rel="noopener noreferrer"&gt;https://stackblitz.com/edit/zingchart-angular-method&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I recommend reviewing &lt;a href="https://www.zingchart.com/docs/api/methods?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=angular" rel="noopener noreferrer"&gt;ZingChart's available methods&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Charting!
&lt;/h2&gt;

&lt;p&gt;With a better understanding of ZingChart and its Angular component, all you need is to include it into your application. Head over to our Github repository for the full documentation of the component: &lt;a href="https://github.com/zingchart/zingchart-angular" rel="noopener noreferrer"&gt;https://github.com/zingchart/zingchart-angular&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A pioneer in the world of data visualization, ZingChart is a powerful Javascript library built with big data in mind. With over 35 chart types and easy integration with your development stack, ZingChart allows you to create interactive and responsive charts with ease.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>javascript</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Connecting Data to a Data Visualization Dashboard with Vue</title>
      <dc:creator>Mike</dc:creator>
      <pubDate>Mon, 18 Nov 2019 21:08:06 +0000</pubDate>
      <link>https://dev.to/zingchartinc/connecting-data-to-a-data-visualization-dashboard-with-vue-1p1b</link>
      <guid>https://dev.to/zingchartinc/connecting-data-to-a-data-visualization-dashboard-with-vue-1p1b</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a continuation article in a series of data visualization examples utilizing the JavaScript framework Vue.js, ZingChart and ZingGrid. We highly recommend starting from the &lt;a href="https://dev.to/zingchartinc/interactive-charts-with-vue-js-12k2"&gt;first article&lt;/a&gt; to follow along more easily.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In our &lt;a href="https://dev.to/zingchartinc/creating-a-data-visualization-dashboard-with-vue-12o1"&gt;previous article&lt;/a&gt;, we walked through an example of how to create a data visualization dashboard with &lt;a href="https://www.zingchart.com/?utm_source=medium&amp;amp;utm_medium=blog&amp;amp;utm_campaign=vue-integration"&gt;ZingChart&lt;/a&gt; and &lt;a href="https://www.zinggrid.com/?utm_source=medium&amp;amp;utm_medium=blog&amp;amp;utm_campaign=vue-integration"&gt;ZingGrid&lt;/a&gt;. We’re continuing this example by connecting our dashboard to real data, and handing the data management and fetching from the server to ZingGrid.&lt;/p&gt;

&lt;p&gt;If you’d like to follow along, a finished example from our last article is the best place to start. You can grab that code from the Github repository under the &lt;code&gt;part-2-complete&lt;/code&gt; branch: &lt;a href="https://github.com/zingsoftinc/vue-dashboard"&gt;https://github.com/zingsoftinc/vue-dashboard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8H91Y24R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/re71frodkaulvj2np6tx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8H91Y24R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/re71frodkaulvj2np6tx.png" alt="Alt Text" width="800" height="781"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a REST API for our dataset
&lt;/h2&gt;

&lt;p&gt;We’ll start by creating a REST API server to host our transactions data. We recommend using &lt;a href="https://github.com/typicode/json-server"&gt;json-server&lt;/a&gt; to quickly deploy endpoints in less than a minute flat!&lt;/p&gt;

&lt;p&gt;First install the JSON server via NPM:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ npm install -g json-server&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can then run the server directly from our &lt;code&gt;transactions.json&lt;/code&gt; &lt;br&gt;
file with:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;json-server --watch /path/tp/transactions.json&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can see if the endpoint is working by making a GET call to &lt;code&gt;http://localhost:3000/transactions&lt;/code&gt; to obtain a full list of our data.&lt;/p&gt;
&lt;h2&gt;
  
  
  Utilizing ZingGrid to manage the data
&lt;/h2&gt;

&lt;p&gt;In the previous article of this series, we handled data flow from the &lt;code&gt;App.vue&lt;/code&gt; down to each component, and obtained the data from a single file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Tze6pyUK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/6pj1ml7z86w638dmk16x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Tze6pyUK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/6pj1ml7z86w638dmk16x.png" alt="Alt Text" width="800" height="319"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Diagram of data flow from the App.vue down to each component&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this article, we’re utilizing ZingGrid’s REST API feature to obtain our dataset from a remote data source. We’ll then communicate the data to all other components on the page, via the main parent &lt;code&gt;App.vue&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fU2TuPHL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/rpe4wb7dbu6djyzj3uom.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fU2TuPHL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/rpe4wb7dbu6djyzj3uom.png" alt="Alt Text" width="800" height="282"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Diagram of data flow from the App.vue using a REST API&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Connecting ZingGrid to a remote data source
&lt;/h2&gt;

&lt;p&gt;ZingGrid works out of the box with most REST API endpoints. We simply configure our data with &lt;code&gt;zg-data&lt;/code&gt; and &lt;code&gt;zg-param&lt;/code&gt; components.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;zg-data&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;zg-param&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"src"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"'http://localhost:3000/transactions"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/zg-param&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;zg-param&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"searchKey"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/zg-param&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;zg-param&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"loadByPage"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/zg-param&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/zg-data&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s breakdown each &lt;code&gt;zg-param&lt;/code&gt; attribute:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;src&lt;/code&gt; — the location of the REST API endpoint where our data resides.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;searchKey&lt;/code&gt; — when using the built-in search functionality on ZingGrid, we specify the query parameter needed to search in the REST API. In our example, &lt;code&gt;json-server&lt;/code&gt; has the query parameter of search.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;loadByPage&lt;/code&gt; - Load by page enables paginated queries on your REST API. This helps reduce the amount of data being transferred by only requesting what is in view. Suppose &lt;code&gt;/transactions&lt;/code&gt; has a total of 2000 entries, and ZingGrid has a paginated view of 10 entries. Without &lt;code&gt;loadByPage&lt;/code&gt;, we would be downloading all 2000 entries initially, instead of the 10 that are just in view!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Connecting our calendar filter to ZingGrid
&lt;/h2&gt;

&lt;p&gt;In order to utilize an external component to handle our data in conjunction with ZingGrid, we need to be a little creative.&lt;/p&gt;

&lt;p&gt;First we pass the start and end dates from our calendar to ZingGrid in our &lt;code&gt;App.vue&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;v-date-picker&lt;/span&gt; &lt;span class="na"&gt;mode=&lt;/span&gt;&lt;span class="s"&gt;"range"&lt;/span&gt; &lt;span class="na"&gt;v-model=&lt;/span&gt;&lt;span class="s"&gt;"range"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;transaction-details-grid&lt;/span&gt; &lt;span class="na"&gt;:start=&lt;/span&gt;&lt;span class="s"&gt;"range.start"&lt;/span&gt; &lt;span class="na"&gt;:end=&lt;/span&gt;&lt;span class="s"&gt;"range.end"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our &lt;code&gt;TransactionDetailsGrid&lt;/code&gt;, we create a new computed property &lt;code&gt;queryString&lt;/code&gt; to reflect a query string with timestamp values, to be appended to our ZingGrid’s data component.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;json-server&lt;/code&gt; has equality operations built in the REST API. For our calendar, we want to create a date range around each &lt;code&gt;timestamp&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;queryString&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`timestamp_lte=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;timestamp_gte=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, we modify our src being passed to ZingGrid, and append our &lt;code&gt;queryString&lt;/code&gt; value to it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;zg-param&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"src"&lt;/span&gt; &lt;span class="na"&gt;:value=&lt;/span&gt;&lt;span class="s"&gt;"'http://localhost:3000/transactions?' + queryString"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/zg-param&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now every time our calendar date-range is updated, ZingGrid re-fetches the data!&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting our charts to our data
&lt;/h2&gt;

&lt;p&gt;We now need to connect the data obtained from ZingGrid to our charts.&lt;/p&gt;

&lt;p&gt;We hook into ZingGrid’s event system to notify our Vue application when data changes, is filtered, or is searched upon.&lt;/p&gt;

&lt;p&gt;We attach event listeners to ZingGrid, and pass a localized callback to emit an event back up to &lt;code&gt;App.vue&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$refs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myGrid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getData&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;visible&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;$emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ondatachange&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$refs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myGrid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;data:load&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$refs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myGrid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;grid:search&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$refs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myGrid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;grid:filter&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Back up in &lt;code&gt;App.vue&lt;/code&gt;, we listen for the &lt;code&gt;ondatachange&lt;/code&gt; in our &lt;code&gt;TransactionDetailsGrid&lt;/code&gt;, and update our local &lt;code&gt;transactions&lt;/code&gt; data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;transaction-details-grid&lt;/span&gt;
 &lt;span class="na"&gt;:start=&lt;/span&gt;&lt;span class="s"&gt;"range.start"&lt;/span&gt;
 &lt;span class="na"&gt;:end=&lt;/span&gt;&lt;span class="s"&gt;"range.end"&lt;/span&gt;
 &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;mouseover=&lt;/span&gt;&lt;span class="s"&gt;"handleEntryHover"&lt;/span&gt;
 &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;ondatachange=&lt;/span&gt;&lt;span class="s"&gt;"updateData"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
updateData(data) {
 // We perform a copy of our data so we can modify it locally.
 this.transactions = JSON.parse(JSON.stringify(data));
},
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zAn6tKoT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/5487ai9jtuizfc06kbvk.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zAn6tKoT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/5487ai9jtuizfc06kbvk.gif" alt="Alt Text" width="800" height="780"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;&lt;a href="https://glitch.com/~vue-dashboard-live-data"&gt;https://glitch.com/~vue-dashboard-live-data&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Our dashboard should be fully functional, with our new remote dataset! Note that filtering and searching in ZingGrid also modify the state of the charts and what values are being represented. This allows for powerful data exploration with &lt;a href="https://www.zinggrid.com/?utm_source=medium&amp;amp;utm_medium=blog&amp;amp;utm_campaign=vue-integration"&gt;ZingGrid&lt;/a&gt; and &lt;a href="https://www.zingchart.com/?utm_source=medium&amp;amp;utm_medium=blog&amp;amp;utm_campaign=vue-integration"&gt;ZingChart&lt;/a&gt;, with the ability to sift through large sets of data. You can view the finished product here: &lt;a href="https://glitch.com/~vue-dashboard-live-data"&gt;https://glitch.com/~vue-dashboard-live-data&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That concludes our series for how to create a data visualization dashboard with Vue! If you’d like to see more Vue data visualization content, feel free to ask away in the comments!&lt;/p&gt;




&lt;p&gt;A pioneer in the world of data visualization, &lt;a href="https://www.zingchart.com"&gt;ZingChart&lt;/a&gt; is a powerful Javascript library built with big data in mind. With over 35 chart types and easy integration with your development stack, ZingChart allows you to create interactive and responsive charts with ease.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>vue</category>
      <category>webdev</category>
      <category>dataviz</category>
    </item>
    <item>
      <title>Creating charts in React just got easier</title>
      <dc:creator>Mike</dc:creator>
      <pubDate>Mon, 11 Nov 2019 16:21:15 +0000</pubDate>
      <link>https://dev.to/zingchartinc/creating-charts-in-react-just-got-easier-1m89</link>
      <guid>https://dev.to/zingchartinc/creating-charts-in-react-just-got-easier-1m89</guid>
      <description>&lt;p&gt;Adding charts to your React Application just got easier thanks to ZingChart’s revised React component.&lt;/p&gt;

&lt;p&gt;The ZingChart team recently updated the &lt;code&gt;zingchart-react&lt;/code&gt; component to create visualizations by adding more features and direct access to events and methods right on the component! We’re excited to show you how it works!&lt;/p&gt;

&lt;h2&gt;
  
  
  ZingChart — The last data visualization library you’ll need
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.zingchart.com/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=react-integration"&gt;ZingChart&lt;/a&gt; is one of the original JavaScript charting libraries, and continues to innovate and improve on its feature set. With over 35 different chart types, a rich API of methods/events to integrate with, and a dedicated support team, ZingChart provides an all-in-one solution for your data visualization needs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--diYSPtFq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/4qlobmhgurs4t6guoa5i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--diYSPtFq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/4qlobmhgurs4t6guoa5i.png" alt="ZingChart has over 35 different base chart types and hundreds of configurations&amp;lt;br&amp;gt;
" width="800" height="379"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;ZingChart has over 35 different base chart types and hundreds of configurations&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Add charts to your React.js application in less than a minute
&lt;/h2&gt;

&lt;p&gt;If you don’t have a React Application, you can easily set one up with &lt;a href="https://github.com/facebook/create-react-app"&gt;create-react-app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ npx create-react-app myApplication&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;First we add the package to our React Application via NPM:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ npm i zingchart-react&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We then include the component in the project file where we want a chart rendered.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import ZingChart from 'zingchart-react';&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Finally, we add a chart into our markup to be rendered!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;App&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;series&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
          &lt;span class="na"&gt;values&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;}]&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ZingChart&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HOEjyQXH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/dbdb01uz1cksgxtqncks.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HOEjyQXH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/dbdb01uz1cksgxtqncks.png" alt="https://glitch.com/~react-chart" width="800" height="436"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;&lt;a href="https://glitch.com/~react-chart"&gt;https://glitch.com/~react-chart&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That was it! Only a few lines of code, and we have a fully reactive chart that updates when your data does.&lt;/p&gt;
&lt;h2&gt;
  
  
  Taking it a step further
&lt;/h2&gt;

&lt;p&gt;The above example is a minimal example of how simple it is to create a chart in ZingChart, however the library is powerful enough to make more complicated and interactive visualizations, too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4SN1ZxJ3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/9ccl604dkz4i9yujqs4t.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4SN1ZxJ3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/9ccl604dkz4i9yujqs4t.gif" alt="https://glitch.com/~zingchart-react-example" width="800" height="523"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;&lt;a href="https://glitch.com/~zingchart-react-example"&gt;https://glitch.com/~zingchart-react-example&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  REACTivity
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;zingchart-react&lt;/code&gt; component is reactive to all of its properties — from the chart configuration to the data. If any changes are sent to the component, the chart is re-rendered automatically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CcuF28uY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/sijr7pywmieork6q6wds.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CcuF28uY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/sijr7pywmieork6q6wds.gif" alt="https://glitch.com/~zingchart-react-reactivity" width="735" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://glitch.com/~zingchart-react-reactivity"&gt;https://glitch.com/~zingchart-react-reactivity&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Events and Methods — Tying your app together with ZingChart
&lt;/h2&gt;

&lt;p&gt;The revised ZingChart component is all about connectivity to your React component. Events are automatically bound to the function you provide via props, and all available ZingChart methods are available when you access a specific component via refs.&lt;/p&gt;
&lt;h3&gt;
  
  
  Events
&lt;/h3&gt;

&lt;p&gt;By binding a function to a known ZingChart event prop, we can perform custom actions when a chart emits an event. In the example below the event &lt;code&gt;node_mouseover&lt;/code&gt; is emitted and its contents are displayed.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;ZingChart ref={this.chart} data={this.state.config} node_mouseover={this.nodeInfo}/&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TMyeFn5C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/d4x0hggznnxrj1ianayx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TMyeFn5C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/d4x0hggznnxrj1ianayx.gif" alt="https://glitch.com/~zingchart-react-events" width="763" height="754"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://glitch.com/~zingchart-react-events"&gt;https://glitch.com/~zingchart-react-events&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;List of all ZingChart events: &lt;a href="https://www.zingchart.com/docs/api/events?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=react-integration"&gt;https://www.zingchart.com/docs/api/events&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Methods
&lt;/h3&gt;

&lt;p&gt;Methods can be called when a ref is given to the component, and a known method is called from the instance of the component. Below is an example of dynamically adding a plot, from a custom button created in React.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;ZingChart ref={this.chart} data={this.state.config}/&amp;gt;
...
this.chart.current.addplot({
  data: {
    values: [5,5,3,6,7,3,4,6,7],
    text: "My new plot"
  }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vq3KM_2K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/h13qe7laqm37vv471zwq.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vq3KM_2K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/h13qe7laqm37vv471zwq.gif" alt="https://glitch.com/~zingchart-react-methods" width="636" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://glitch.com/~zingchart-react-methods"&gt;https://glitch.com/~zingchart-react-methods&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;List of all ZingChart methods: &lt;a href="https://www.zingchart.com/docs/api/methods?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=react-integration"&gt;https://www.zingchart.com/docs/api/methods&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All of the above examples can be found on our glitch collection:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://glitch.com/@zing-soft/react"&gt;https://glitch.com/@zing-soft/react&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Charting!
&lt;/h2&gt;

&lt;p&gt;With a better understanding of ZingChart and its React component, all you need is to include it into your application. Head over to our Github repository for the full documentation of the component: &lt;a href="https://github.com/zingchart/zingchart-react"&gt;https://github.com/zingchart/zingchart-react&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A pioneer in the world of data visualization, ZingChart is a powerful Javascript library built with big data in mind. With over 35 chart types and easy integration with your development stack, ZingChart allows you to create interactive and responsive charts with ease.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Coding Out of a Van in New Zealand</title>
      <dc:creator>Mike</dc:creator>
      <pubDate>Thu, 07 Nov 2019 01:21:24 +0000</pubDate>
      <link>https://dev.to/mikeschultz/coding-out-of-a-van-in-new-zealand-kk1</link>
      <guid>https://dev.to/mikeschultz/coding-out-of-a-van-in-new-zealand-kk1</guid>
      <description>&lt;p&gt;We all know about remote jobs and how productive you can still be outside of an office setting. But what about working &lt;em&gt;remotely&lt;/em&gt;? And I mean &lt;em&gt;really remotely&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;I have been traveling the world for the past 6 months, working remotely as a Software Engineer. Currently I have been in New Zealand for the past couple months, traveling the islands, taking tons of pictures, and working remotely - all from the comfort of my campervan. Striving for that ultimate work/life balance, optimizing any free time to go exploring, and to enjoy my passion of photography.&lt;/p&gt;

&lt;p&gt;I get asked quite often how I'm able to work on the road, and how I deal with keeping connected. I figured I'd share my experience so far and what's unique to coding &lt;em&gt;remotely&lt;/em&gt;! I won't bore you with the details of utilizing slack for communication, and how to deal with timezones as I'm sure every digital nomad article out there touches on that. Instead, I'll share the quirks and challenges that I deal with on the road - from finding places to work at to searching for the next place to spend the night. &lt;/p&gt;

&lt;h2&gt;
  
  
  Places to work
&lt;/h2&gt;

&lt;p&gt;When you're on the road...the road is your workplace! I find a balance between coffee shops, libraries, or even just out of the campervan very flexible.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VdWN_I5R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/57oy4eh2hgchfgd4xps9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VdWN_I5R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/57oy4eh2hgchfgd4xps9.jpg" alt="Alt Text" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you get to work out of some pretty awesome places:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Cs5pL1dK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/i002qw13ugazv1u2g6sj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Cs5pL1dK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/i002qw13ugazv1u2g6sj.jpg" alt="Alt Text" width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(ok this is actually in Melbourne, Australia, but it'd definitely one of the coolest libraries I've been to).&lt;/p&gt;

&lt;p&gt;But it's not all picturesque. I've definitely had some late nights in airports, buses, and hostels trying to hotfix some bugs. &lt;br&gt;
or when it's rainy outside and you're confined to the campervan... &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oSAE27RQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/rowpvz1lxcluh4vpoo9s.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oSAE27RQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/rowpvz1lxcluh4vpoo9s.gif" alt="Alt Text" width="250" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Internet
&lt;/h2&gt;

&lt;p&gt;This is a TOUGH one. When you're mobile, you're relying on public wifi (cringe 😬. Don't worry, I practice safe public wifi usage.) and tethering off of your mobile phone if you have signal.&lt;/p&gt;

&lt;p&gt;For security concerns and speed, I tried to always tether off my phone. In New Zealand, pay-as-you go phone plans average about $70-80NZD (~$50USD) for 40-50GB. However once you run out, additional data becomes astronomical. I've seen $20NZD for every GB extra!&lt;/p&gt;

&lt;p&gt;Needless to say, rationing of data became very real and I have a new appreciation towards the movement of towards Progressive Web Applications and keeping things RAIL - that is to make the web smaller, faster, and more efficient.&lt;/p&gt;

&lt;p&gt;I ended up hopping network providers every time I ran out of data. Also have my US sim card (Google Fi) for emergency data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mxB42Dnt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/1q34sinxsn7arcfmarrf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mxB42Dnt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/1q34sinxsn7arcfmarrf.jpg" alt="Alt Text" width="753" height="749"&gt;&lt;/a&gt;&lt;br&gt;
(sim card graveyard)&lt;/p&gt;

&lt;h2&gt;
  
  
  Places to spend the night (or just work from).
&lt;/h2&gt;

&lt;p&gt;New Zealand is one of the easiest places to live in a campervan  - Freedom Camping.&lt;/p&gt;

&lt;p&gt;All over the country are designated camping spaces where you can freely park, camp, and sleep from! These spaces most often have amenities such as toilets, dump stations (for your van), and sometimes have free wifi! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gpLCPwU8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/059wpeg9up91qo0izh9u.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gpLCPwU8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/059wpeg9up91qo0izh9u.gif" alt="Alt Text" width="320" height="693"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I found these sites the best to hunker down and get some long hours of work done without any distractions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--URLwpb-A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/rm21qowkhch8yb7wvzqr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--URLwpb-A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/rm21qowkhch8yb7wvzqr.jpg" alt="Alt Text" width="500" height="625"&gt;&lt;/a&gt;&lt;br&gt;
(Yeah, thats a freedom camping site. Cellular signal was great too!)&lt;/p&gt;

&lt;p&gt;There are also a number of paid campgrounds with showers, kitchens, secured wifi (sometimes unlimited), and common lounging areas. I do recommend these for when you want a little bit of "luxury".&lt;/p&gt;

&lt;h2&gt;
  
  
  The Work-Life balance
&lt;/h2&gt;

&lt;p&gt;This may seem like a lot of effort, just to travel - and you're right it is. In fact, I'm quite exhausted just typing all of this out! While coding and Software Engineering are my professional passions, photography and hiking are my personal passions. Traveling to the ends of the earth, waking up at 2am to hike to the top of the mountain just to catch the sunrise. It's what keeps my mind fresh and helps to bring new ideas to my life and career.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pvKO4at6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/kcxblsutcrdtkitlces5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pvKO4at6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/kcxblsutcrdtkitlces5.png" alt="Alt Text" width="800" height="1008"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aDOQMxSc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/363rybf2a597pjtv94pp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aDOQMxSc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/363rybf2a597pjtv94pp.png" alt="Alt Text" width="800" height="997"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Quick plug for my instagram: &lt;a href="https://www.instagram.com/pixelsight/"&gt;https://www.instagram.com/pixelsight/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's a journey not for everyone, but hopefully I've inspired some of you to try and find that work-life balance, no matter how extreme it is! Thanks for reading!&lt;/p&gt;

</description>
      <category>career</category>
      <category>productivity</category>
      <category>worklifebalance</category>
    </item>
    <item>
      <title>Creating a Data Visualization Dashboard with Vue</title>
      <dc:creator>Mike</dc:creator>
      <pubDate>Tue, 29 Oct 2019 19:47:03 +0000</pubDate>
      <link>https://dev.to/zingchartinc/creating-a-data-visualization-dashboard-with-vue-12o1</link>
      <guid>https://dev.to/zingchartinc/creating-a-data-visualization-dashboard-with-vue-12o1</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fm188bn7gty3wzge8o9ev.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fm188bn7gty3wzge8o9ev.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Creating custom dashboards is hard work! Whether it be an analytics dashboard to monitor your site’s traffic and social presence, or a SaaS dashboard to see how your product is growing, creating a dashboard from scratch can be quite complex and time-consuming.&lt;br&gt;
This is the second article in our series about integrating ZingChart with Vue to create an interactive dashboard. If you’d like to learn more about the zingchart-vue component, check out the &lt;a href="https://medium.com/@zingchart/interactive-charts-with-vue-js-e72de19fa6cd" rel="noopener noreferrer"&gt;first article in this series&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fj2ofym8ahvciehw0sarb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fj2ofym8ahvciehw0sarb.png" alt="This interactive Vue sales dashboard includes ZingChart’s bar, line, and pie chart types, as well as a ZingGrid data table."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the use of third party libraries, we can alleviate most of the heavy lifting and create dashboards that have complex interactivity with minimal effort. This article will be an overview of the libraries needed to create almost any type of dashboard.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://vuejs.org/" rel="noopener noreferrer"&gt;Vue.js&lt;/a&gt; — We will be using the popular Vue JavaScript framework to build our dashboard around. With its robust data handling and rich developer community with UI widgets, this is the perfect framework to set the groundwork.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.zingchart.com/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=vue-integration" rel="noopener noreferrer"&gt;ZingChart&lt;/a&gt; — To create dashboards with unique visualizations, we will need a library that covers all use cases. ZingChart provides over 30 different chart types including the basics such as Line, Bar, and Pie Charts, but also more unique visualizations such as WordCloud, Gauge, and Radar. The library even has maps!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.zinggrid.com?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=vue-integration" rel="noopener noreferrer"&gt;ZingGrid&lt;/a&gt; — Dashboards aren’t complete without a data table to display details about our data in a logical format. A complementary product to ZingChart, ZingGrid will provide a useful set of features to handle our data including filtering, sorting, and searching. With its unique compatibility with ZingChart allowing rich interactivity between the two products, it’s a no brainer to add this library to our arsenal.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Visualizing your Data with ZingChart
&lt;/h2&gt;

&lt;p&gt;We can easily customize and add charts to our dashboard using the &lt;code&gt;zingchart-vue&lt;/code&gt; component. The component allows for easy data-binding, and exposes out ZingChart’s events and methods to the component level. For more information about the ZingChart Vue component, check out the previous article in this series: &lt;a href="https://medium.com/@zingchart/interactive-charts-with-vue-js-e72de19fa6cd" rel="noopener noreferrer"&gt;https://medium.com/@zingchart/interactive-charts-with-vue-js-e72de19fa6cd&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Inspecting your Data with ZingGrid
&lt;/h2&gt;

&lt;p&gt;Charts and data visualizations are great for understanding your data, but when you need to see specific details of an event it can be tedious. Data grids and tables are useful for organizing large amounts of data and for finding specific entries in that data.&lt;/p&gt;
&lt;h3&gt;
  
  
  Adding Data to the Grid
&lt;/h3&gt;

&lt;p&gt;Unlike ZingChart, ZingGrid is built as a web component and is portable in any framework including Vue. We can easily add data to our grid with the &lt;code&gt;data&lt;/code&gt; attribute and the &lt;code&gt;.prop&lt;/code&gt; modifier, which stringifies the data before being sent to ZingGrid. This not only allows ZingGrid to retain a fresh copy of the data, but automatically converts it to a format that web components can understand.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;zing-grid :data.prop="myData"&amp;gt;&amp;lt;/zing-grid&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Filtering, Sorting, and Pagination, Oh My!
&lt;/h3&gt;

&lt;p&gt;A list of data entries isn’t useful unless there is a way to navigate through the list easily. ZingGrid provides multiple useful features that let you easily sort through your data. Best of all, adding these features is as simple as adding an attribute to the &lt;code&gt;&amp;lt;zing-grid&amp;gt;&lt;/code&gt; element.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;zing-grid :data.prop="myData" filter sort pager&amp;gt;&amp;lt;/zing-grid&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2o7o6769uji2qk2vtslw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2o7o6769uji2qk2vtslw.gif" alt="This interactive ZingGrid data table includes filtering, sorting, and pagination.&amp;lt;br&amp;gt;
"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Interactivity with Other Components
&lt;/h3&gt;

&lt;p&gt;Like ZingChart, ZingGrid allows for deep integration to its environment with API methods and events. You can learn more about these in the docs: &lt;a href="https://www.zinggrid.com/docs/api-methods?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=vue-integration" rel="noopener noreferrer"&gt;https://www.zinggrid.com/docs/api-methods&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we have a basic understanding of the tools we’re going to utilize, let’s build our dashboard!&lt;/p&gt;


&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;For this tutorial, you will need the &lt;code&gt;vue-cli&lt;/code&gt; installed on your computer. This will allow us to quickly scaffold, run, and test our dashboard with ease. If you don’t have this cli tool installed, head over to &lt;a href="https://cli.vuejs.org/#getting-started" rel="noopener noreferrer"&gt;https://cli.vuejs.org/#getting-started&lt;/a&gt; to start there.&lt;/p&gt;

&lt;p&gt;Once it’s installed, we’ll create a project with our dashboard starter code.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;vue create --preset zingsoftinc/vue-dashboard#starter myDashboard&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After this tutorial you should be familiar with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic data flow and manipulation in a dashboard&lt;/li&gt;
&lt;li&gt;Creating ZingChart and ZingGrid in Vue&lt;/li&gt;
&lt;li&gt;Communicating across multiple widgets in the dashboard&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The starter code contains styling and structure already defined to help you focus on the important highlights of creating your dashboard.&lt;/p&gt;
&lt;h2&gt;
  
  
  Project Overview
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;myDashboard/
├── src/
│   ├── App.vue
│   ├── main.js
│   │── data/
│   │  └── transactions.js
│   ├── components/
│   │  ├── LatestTransactionsChart.vue
│   │  ├── TransactionDetailsGrid.vue
└───└──└── TransactionBreakdownChart.vue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;App.vue&lt;/code&gt; - The root Vue component which contains our dashboard&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;main.js&lt;/code&gt; - The entry point for our Vue application&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;components/&lt;/code&gt; - Various charts and grids that we will learn how to connect together&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;data/&lt;/code&gt; - The dataset that our dashboard will build off of. In future tutorials, we'll learn how to connect and filter data to remote sources, including databases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The starter code has three components pre-defined and styled for you. Our focus will be on how to manipulate our dataset to pass data to each component, and to tie-in interactions across those components.&lt;/p&gt;
&lt;h3&gt;
  
  
  Our Dataset
&lt;/h3&gt;

&lt;p&gt;For this tutorial we'll be creating a sales analytics dashboard based on a set of transactions. Our dataset is simply an array of these objects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"first_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"Ketti"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"last_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"Latham"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"klatham0@time.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"company"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"InnoZ"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"1529.29"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"timestamp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;1554550724000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"license_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"saas"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"purchase_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"new"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Important attributes :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;license_type&lt;/code&gt; - Either SaaS, internal, website, or enterprise&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;purchase_type&lt;/code&gt; - Either new, renewal, or cancellation (if the user has opted out from a renewal)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Our Components
&lt;/h3&gt;

&lt;p&gt;We will be focusing on three different components in this tutorial, comprised of ZingChart and ZingGrid.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0mcvmld7ie0kcc8mvg39.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0mcvmld7ie0kcc8mvg39.png" alt="A close-up of some of the components in our Vue dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;LatestTransactionsChart.vue&lt;/code&gt; - A line chart comparing the amount earned in dollars over time&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TransactionBreakdownChart.vue&lt;/code&gt; - A pie chart breaking down the occurrence of each transaction type&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TransactionDetailsGrid.vue&lt;/code&gt; - A grid listing each transaction during the period&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Passing Data to the Components
&lt;/h2&gt;

&lt;p&gt;For our components to render any charts or grids, we need to pass the data to each component individually since specific charts and grids may need to have the data formatted differently.&lt;br&gt;
First we'll import our data from the transactions file into our &lt;code&gt;App.vue&lt;/code&gt;, along with our chart components. We also register the components in our Vue app to be used.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;// App.vue
&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;transactions&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./data/transactions.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;LatestTransactionsChart&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./components/LatestTransactionsChart.vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;TransactionBreakdownChart&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./components/TransactionBreakdownChart.vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;TransactionDetailsGrid&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./components/TransactionDetailsGrid.vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="c1"&gt;// Register the components to be used&lt;/span&gt;
    &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;LatestTransactionsChart&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;TransactionBreakdownChart&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;TransactionDetailsGrid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nf"&gt;data&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;transactions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we'll pass the transactions object into each of our three components.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;// App.vue
&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"app"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"dashboard"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      ...
      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"dashboard__row"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;latest-transactions-chart&lt;/span&gt; &lt;span class="na"&gt;ref=&lt;/span&gt;&lt;span class="s"&gt;"latestTransactions"&lt;/span&gt; &lt;span class="na"&gt;:entries=&lt;/span&gt;&lt;span class="s"&gt;"transactions"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;transaction-breakdown-chart&lt;/span&gt; &lt;span class="na"&gt;ref=&lt;/span&gt;&lt;span class="s"&gt;"transactionBreakdown"&lt;/span&gt; &lt;span class="na"&gt;:entries=&lt;/span&gt;&lt;span class="s"&gt;"transactions"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"dashboard__row"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;transaction-details-grid&lt;/span&gt; &lt;span class="na"&gt;:entries=&lt;/span&gt;&lt;span class="s"&gt;"transactions"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's dive into each of our three components to manipulate the data to render out a chart or a grid.&lt;/p&gt;

&lt;h3&gt;
  
  
  Latest Transactions Chart
&lt;/h3&gt;

&lt;p&gt;For the "Latest Transactions Chart", we need to format our &lt;code&gt;transactions&lt;/code&gt; array into a single dimensional array containing a pair of values: the timestamp, followed by the dollar amount for each transaction.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;// LatestTransactionsChart.vue
&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;zingchart&lt;/span&gt; &lt;span class="na"&gt;:data=&lt;/span&gt;&lt;span class="s"&gt;"chartConfig"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/zingchart&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;props&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;entries&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="nf"&gt;values&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))]&lt;/span&gt;
       &lt;span class="p"&gt;});&lt;/span&gt;
     &lt;span class="p"&gt;},&lt;/span&gt;
     &lt;span class="nf"&gt;chartConfig&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="p"&gt;...&lt;/span&gt;
       &lt;span class="na"&gt;series&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
         &lt;span class="na"&gt;values&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="p"&gt;}],&lt;/span&gt;
       &lt;span class="p"&gt;...&lt;/span&gt;
     &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We write both the &lt;code&gt;values&lt;/code&gt; and &lt;code&gt;chartConfig&lt;/code&gt; as computed properties rather than data so we can automatically track any changes that occur to the data from the parent &lt;code&gt;App.vue&lt;/code&gt; component.&lt;/p&gt;

&lt;h2&gt;
  
  
  Transaction Breakdown Chart
&lt;/h2&gt;

&lt;p&gt;Similarly for our "Transaction Breakdown" Chart, we need to format the data as an array of objects, with each value containing the total value of the transaction types. ZingChart will calculate the overall percentage for us, but we'll need to do a bit of summations over the transactions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;// TransactionBreakdown.vue
&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;zingchart&lt;/span&gt; &lt;span class="na"&gt;:data=&lt;/span&gt;&lt;span class="s"&gt;"chartConfig"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/zingchart&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;props&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;entries&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="nf"&gt;values&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;categories&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;transaction&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;transaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;purchase_type&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;transaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;purchase_type&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;transaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;purchase_type&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{});&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;categories&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;values&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;categories&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;]],&lt;/span&gt;
          &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;})&lt;/span&gt;
     &lt;span class="p"&gt;},&lt;/span&gt;
     &lt;span class="nf"&gt;chartConfig&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;colors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#04A3F5&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;hoverState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#45D6C4&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#98D1EE&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;hoverState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#45D6C4&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#295A73&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;hoverState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#45D6C4&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;];&lt;/span&gt; 

       &lt;span class="p"&gt;...&lt;/span&gt;
        &lt;span class="na"&gt;series&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;])),&lt;/span&gt;
       &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;script&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Transaction Details Grid
&lt;/h3&gt;

&lt;p&gt;As for the "Transaction Details" Grid, ZingGrid natively accepts an array of objects so all we have to do is pass the data!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;transaction-details-grid :entries="transactions"&amp;gt;&amp;lt;/transaction-details-grid&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Adding an External Component to Control Our Data
&lt;/h3&gt;

&lt;p&gt;If all went smoothly you should see the charts and grids populated with a full year's worth of transactions. But what if we only wanted to view a month's view of transactions? We would need to control our data at the App level to do so.&lt;br&gt;
We will be adding an additional library to help us select dates via a calendar component:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Frd4lm9szxat6ptn8eonj.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Frd4lm9szxat6ptn8eonj.gif" alt="V-calendar to filter our transactions by date."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://vcalendar.io/" rel="noopener noreferrer"&gt;https://vcalendar.io/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First let's install the library to our project:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ npm i v-calendar&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And add the following lines to our &lt;code&gt;main.js&lt;/code&gt;, just before the &lt;code&gt;new Vue&lt;/code&gt; constructor is invoked.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;VCalendar&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;v-calendar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;VCalendar&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside of our &lt;code&gt;App.vue&lt;/code&gt; file we'll need to add a new field in our data object to keep track of the start and end dates that the calendar is displaying. We will default to showing the current month's transactions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;data&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;transactions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;range&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;setDate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; 
        &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; 
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will be using the &lt;code&gt;range&lt;/code&gt; property to control both the start and end dates with one widget. Next, we'll add the &lt;code&gt;v-calendar&lt;/code&gt;component to our template, binding both the start and end dates to our new data fields.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;header&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h4&amp;gt;&lt;/span&gt;Date Range&lt;span class="nt"&gt;&amp;lt;/h4&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;v-date-picker&lt;/span&gt; &lt;span class="na"&gt;mode=&lt;/span&gt;&lt;span class="s"&gt;"range"&lt;/span&gt; &lt;span class="na"&gt;v-model=&lt;/span&gt;&lt;span class="s"&gt;"range"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A new computed property called &lt;code&gt;filteredTransactions&lt;/code&gt; will be needed to return a subset of the transactions, based on the date range.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="nx"&gt;computed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;filteredTransactions&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;transactions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timestamp&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;range&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
          &lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timestamp&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;range&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, we'll update all the components to accept the new filtered date range:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;latest-transactions-chart&lt;/span&gt; &lt;span class="na"&gt;:entries=&lt;/span&gt;&lt;span class="s"&gt;"filteredTransactions"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/latest-transactions-chart&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;transaction-breakdown-chart&lt;/span&gt; &lt;span class="na"&gt;:entries=&lt;/span&gt;&lt;span class="s"&gt;"filteredTransactions"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/transaction-breakdown-chart&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;transaction-details-grid&lt;/span&gt; &lt;span class="na"&gt;:entries=&lt;/span&gt;&lt;span class="s"&gt;"filteredTransactions"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/transaction-details-grid&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="k"&gt;template&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The charts and grids should now show a subset range of the transactions! This also demonstrates how data modeling works in Vue: one-way reactivity from the parent to its children.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Adding Interactions Between the Components
&lt;/h2&gt;

&lt;p&gt;Our dashboard is looking more complete, but to take it a step further we can add shared interactivity between the components. Both ZingChart and ZingGrid come with rich API Methods and Events, from reacting to MouseEvents to modifying state from external methods.&lt;/p&gt;

&lt;p&gt;We will be demonstrating how to control &lt;code&gt;mouseover&lt;/code&gt; events from ZingGrid to highlight the same entry in both our Latest Transactions and Transaction Breakdown Charts.&lt;/p&gt;

&lt;p&gt;To begin, we need to listen for ZingGrid's row &lt;code&gt;mouseover&lt;/code&gt; event. ZingGrid calls this a &lt;code&gt;record:mouseover&lt;/code&gt; event. We perform this in the component's mounted() lifecycle callback once the grid has finished rendering.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// TransactionDetailsGrid.vue&lt;/span&gt;
&lt;span class="nf"&gt;mounted&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Attach an event listener to ZingGrid&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$refs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myGrid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;record:mouseover&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;$emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mouseover&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since we have encapsulated each of our chart and grid components in their own respective components for code clarity, we need to emit this event back up into our &lt;code&gt;App.vue&lt;/code&gt; parent component.&lt;/p&gt;

&lt;p&gt;Back in our &lt;code&gt;App.vue&lt;/code&gt; file, we need to delegate the mouseover &lt;br&gt;
event from ZingGrid to our children charts.&lt;/p&gt;

&lt;p&gt;First we define a callback that the &lt;code&gt;mouseover&lt;/code&gt; event should listen to.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;// App.vue
&lt;span class="nt"&gt;&amp;lt;transaction-details-grid&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;mouseover=&lt;/span&gt;&lt;span class="s"&gt;"handleEntryHover"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/transaction-details-grid&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our new method &lt;code&gt;handleEntryHover&lt;/code&gt;, we reference both our charts and call on the ZingChart methods that are available thanks to the zingchart-vue component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="nx"&gt;methods&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;handleEntryHover&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Obtain references to the charts&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;latestTransactions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$refs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;latestTransactions&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;transactionBreakdown&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$refs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;transactionBreakdown&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since ZingGrid emits CustomEvents, the information that we need will be under e.detail. Inside, we see a rich amount of information about the grid and the event.&lt;/p&gt;

&lt;p&gt;For our Latest Transactions chart, we want a guide to appear on the chart when the user hovers over the corresponding row in our grid. To do so, we need to call the chart's &lt;code&gt;setguide&lt;/code&gt; method and pass it an object containing the specific key/value (x-axis value), or in this case the timestamp.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Set our guide corresponding to the correct timestamp&lt;/span&gt;
&lt;span class="nx"&gt;latestTransaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setguide&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;keyvalue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;detail&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ZGData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timestamp&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For our Transaction Breakdown chart, we will need to determine the row entry's &lt;code&gt;purchase_type&lt;/code&gt; and the corresponding index that the data is defined when we created the chart.&lt;/p&gt;

&lt;p&gt;We utilize the &lt;code&gt;getseriesdata&lt;/code&gt; method of the chart to obtain the data used to create the chart to find the index. Once found, we then call the &lt;code&gt;showhoverstate&lt;/code&gt; to change the pie slice color to highlight the entry in focus. Recall that the data format of the pie chart is an array of a single entry. The &lt;code&gt;showhoverstate&lt;/code&gt; method requires a &lt;code&gt;nodeindex&lt;/code&gt; so we default at &lt;code&gt;0&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;indexInFocus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;transactionBreakdown&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getseriesdata&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findIndex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;detail&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ZGData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;purchase_type&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;transactionBreakdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;showhoverstate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;plotindex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;indexInFocus&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;nodeindex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;handleEntryHover&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Obtain references to the charts&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;latestTransactions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$refs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;latestTransactions&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;transactionBreakdown&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$refs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;transactionBreakdown&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Set our guide corresponding to the correct timestamp&lt;/span&gt;
  &lt;span class="nx"&gt;latestTransaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setguide&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;keyvalue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;detail&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ZGData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// Highlight the pie slice in focus&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;indexInFocus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;transactionBreakdown&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getseriesdata&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findIndex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;detail&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ZGData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;purchase_type&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;transactionBreakdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;showhoverstate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;plotindex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;indexInFocus&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;nodeindex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And there you have it! Interactions across ZingGrid and ZingChart.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fj9wq7tbb769hiece7idy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fj9wq7tbb769hiece7idy.gif" alt="![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/j9wq7tbb769hiece7idy.gif)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check out a completed, working example of this Vue dashboard in the master branch of our starter code at &lt;a href="https://github.com/zingsoftinc/vue-dashboard" rel="noopener noreferrer"&gt;https://github.com/zingsoftinc/vue-dashboard&lt;/a&gt; and at &lt;a href="https://glitch.com/~vue-dashboard-starter" rel="noopener noreferrer"&gt;https://glitch.com/~vue-dashboard-starter&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;We took our example a step further and created a sales dashboard with custom sparklines and more interactions and features. You can check out a working example and the code for it here: &lt;a href="https://glitch.com/~vue-dashboard" rel="noopener noreferrer"&gt;https://glitch.com/~vue-dashboard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2hp9f1u2a2do5nv7qom8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2hp9f1u2a2do5nv7qom8.gif" alt="This advanced version of the Vue sales dashboard featured in this tutorial includes even more interactivity."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next time we'll show you how to connect a live database, to search, filter, and query directly from your dashboard.&lt;/p&gt;

&lt;p&gt;To be notified of future articles follow us on &lt;a href="https://twitter.com/ZingChart" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;A pioneer in the world of data visualization, ZingChart is a powerful Javascript library built with big data in mind. With over 35 chart types and easy integration with your development stack, ZingChart allows you to create interactive and responsive charts with ease.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>dashboard</category>
      <category>datavisualization</category>
      <category>vue</category>
    </item>
    <item>
      <title>Interactive charts with Vue.js</title>
      <dc:creator>Mike</dc:creator>
      <pubDate>Wed, 16 Oct 2019 09:21:34 +0000</pubDate>
      <link>https://dev.to/zingchartinc/interactive-charts-with-vue-js-12k2</link>
      <guid>https://dev.to/zingchartinc/interactive-charts-with-vue-js-12k2</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yZxGcTaN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ygterevaf3l3s7kf9szc.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yZxGcTaN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ygterevaf3l3s7kf9szc.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Deciding which JavaScript charting library to include in your Vue.js application can be challenging due to the number of data visualization options out on the web.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.zingchart.com/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=vue-integration"&gt;ZingChart&lt;/a&gt; stands out by having over 100 unique events and methods to control, modify, and interact with Vue. The library not only includes over 35 unique chart types, but also has enough customization that you can create your own visualizations! If that's not enough, ZingChart recently released their official Vue.js component that wraps all of the library's functionality to be used easily in a Vue Application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/zingchart/zingchart-vue"&gt;https://github.com/zingchart/zingchart-vue&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's see how it works…&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a chart
&lt;/h2&gt;

&lt;h3&gt;
  
  
  A Hello World
&lt;/h3&gt;

&lt;p&gt;A simple example of creating a chart using the zingchart-vue component is the best way to demonstrate the ease of the library.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;zingchart&lt;/span&gt; &lt;span class="na"&gt;:data=&lt;/span&gt;&lt;span class="s"&gt;"{type: 'line', legend: {}, series: [{values: [4,5,3,3,3,4,5]}}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/zingchart&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The component takes a &lt;code&gt;data&lt;/code&gt; configuration object specified by ZingChart to describe the features and values that a chart should take. The above example describes a line chart with some values to be plotted, along with a legend.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IDOJCwWZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/7degesbgdirgqi8clx4h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IDOJCwWZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/7degesbgdirgqi8clx4h.png" alt="https://glitch.com/~vue-chart"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://glitch.com/~vue-chart"&gt;https://glitch.com/~vue-chart&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  A More Advanced Example
&lt;/h3&gt;

&lt;p&gt;The above example is a simple demonstration of how easy it is to create a line chart, but if we wanted something more complex and customized, the library and component allow us to do so:&lt;/p&gt;


&lt;div class="glitch-embed-wrap"&gt;
  &lt;iframe src="https://glitch.com/embed/#!/embed/vue-stock-chart?previewSize=100&amp;amp;path=index.html" alt="vue-stock-chart on glitch"&gt;&lt;/iframe&gt;
&lt;/div&gt;



&lt;h2&gt;
  
  
  Data Reactivity
&lt;/h2&gt;

&lt;p&gt;The Vue component automatically updates whenever any of its attributes change. This includes series values, or anything in the configuration object.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hVGG5TRc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/x4oijwped1fwh4bmpyld.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hVGG5TRc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/x4oijwped1fwh4bmpyld.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://glitch.com/~zingchart-vue-reactivity"&gt;https://glitch.com/~zingchart-vue-reactivity&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Interactivity with other components
&lt;/h2&gt;

&lt;p&gt;We can integrate our charts to other charts or UI components by listening to events, and modifying the chart using methods.&lt;/p&gt;
&lt;h3&gt;
  
  
  Binding Events
&lt;/h3&gt;

&lt;p&gt;For example, if we wanted to display a node's value on hover in our Vue application, we would hook into the &lt;code&gt;node_mouseover&lt;/code&gt; event.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r_uqCRl3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lgdp347nx4gxc8646egz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r_uqCRl3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lgdp347nx4gxc8646egz.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://glitch.com/~zingchart-vue-events"&gt;https://glitch.com/~zingchart-vue-events&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All events that ZingChart emits are available on the Vue component with the "@" annotation.&lt;/p&gt;
&lt;h3&gt;
  
  
  Modifying with methods
&lt;/h3&gt;

&lt;p&gt;Alternatively, if we wanted to annotate our chart by adding a label to a specific node, we would utilize the &lt;code&gt;addobject&lt;/code&gt; API method and create a new label:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$refs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myChart&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addobject&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;label&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Something interesting!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;background-color&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#3f51b5&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;font-size&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;14px&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;font-weight&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;normal&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;font-color&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#FFFFFF&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;padding&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;10%&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;border-radius&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;3px&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;offset-y&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;shadow&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;callout&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;callout-height&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;10px&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;callout-width&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;15px&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hook&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;node:plot=0;index=4&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r31Xsr3V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/x4hhtzv7vjozz602aygo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r31Xsr3V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/x4hhtzv7vjozz602aygo.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://glitch.com/~zingchart-vue-methods"&gt;https://glitch.com/~zingchart-vue-methods&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All methods are readily available on the component's object to be called.&lt;/p&gt;

&lt;h3&gt;
  
  
  Get Charting!
&lt;/h3&gt;

&lt;p&gt;With a better understanding of ZingChart and its Vue component, all you need is to include it into your application. Head over to our Github repository for the full documentation of the component: &lt;a href="https://github.com/zingchart/zingchart-vue"&gt;https://github.com/zingchart/zingchart-vue&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Stay Tuned
&lt;/h2&gt;

&lt;p&gt;Over the coming weeks we will be creating a dashboard built with Vue and the zingchart-vue component to demonstrate the flexibility and power of both tools. To receive updates of when we publish new articles, follow us on twitter:&lt;/p&gt;

&lt;p&gt;&lt;a href="//https:/twitter.com/zingchart"&gt;https:/twitter.com/zingchart&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>charts</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
