<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is it possible to custom visualization based on echarts? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/212217#M6702</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/5730"&gt;@MawashiKid&lt;/a&gt;&amp;nbsp;Thank yoou for the help.&lt;BR /&gt;&lt;BR /&gt;Seeing these solutions, I tried to go another way and use google.visualizations lib.&lt;BR /&gt;But I still can't doing the visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here, you can see my class visual.ts. The problem is that the code does not pass from the line "&lt;SPAN&gt;google&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;load&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'visualization'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'1.0'&lt;/SPAN&gt;&lt;SPAN&gt;, {&lt;/SPAN&gt;&lt;SPAN&gt;packages:&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;'corechart'&lt;/SPAN&gt;&lt;SPAN&gt;]});"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you help me? Do you see something wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/50168i2D2E96D02DE60B6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks,&lt;/P&gt;&lt;P&gt;JeanPierre.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jul 2017 16:38:41 GMT</pubDate>
    <dc:creator>JeanPierre</dc:creator>
    <dc:date>2017-07-14T16:38:41Z</dc:date>
    <item>
      <title>Is it possible to custom visualization based on echarts?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/210759#M6654</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a visualization based on the echarts, however I don't know if is it possible, because the power Bi custom visualization is in typescript and the code of echarts is not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The echart visualization I want to do is on the link:&amp;nbsp;&lt;A href="https://ecomfe.github.io/echarts-examples/public/editor.html?c=pie-custom" target="_blank"&gt;https://ecomfe.github.io/echarts-examples/public/editor.html?c=pie-custom&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If is it possible, how do I import the code for typescript?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;JeanPierre.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 18:08:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/210759#M6654</guid>
      <dc:creator>JeanPierre</dc:creator>
      <dc:date>2017-07-12T18:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to custom visualization based on echarts?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/211192#M6662</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/33383"&gt;@JeanPierre&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This's possible. You just need to include&amp;nbsp;all of necessary JavaScript files using&amp;nbsp;&lt;SPAN&gt;externalJS property of the pbiviz.json file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After that, you will be able to use the library with TypeScript. However, you might need to find TS typings to simplify development process and get IntelliSense.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 10:08:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/211192#M6662</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-07-13T10:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to custom visualization based on echarts?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/211555#M6675</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I haven't had the chance to dive too deep in &lt;STRONG&gt;echarts&lt;/STRONG&gt; samples, though I would imagine&lt;BR /&gt;this could be achieved.&lt;BR /&gt;The big question is how...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'd say the one key element to take into account when it comes to create ANY custom visuals&lt;BR /&gt;from EXISTING code, &amp;nbsp;is that you're NOT&amp;nbsp;really coding some charts code which will sit in a Web page, but rather&lt;BR /&gt;a reusable visual component model which user will be able to manipulate for&amp;nbsp;their convenience in a Power BI IDE environment.&lt;BR /&gt;&lt;BR /&gt;So we all agree that it's a bit more subtle than just doing a Cut &amp;amp; Paste, then running &lt;STRONG&gt;pbiviz package&lt;/STRONG&gt;&lt;BR /&gt;and expect everything to run in a snap.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Since &lt;STRONG&gt;echart&lt;/STRONG&gt; is &lt;STRONG&gt;JavaScript&lt;/STRONG&gt; then this shouldn't cause a problem as you should be able&lt;BR /&gt;to generate required both &lt;STRONG&gt;echarts&lt;/STRONG&gt; and &lt;STRONG&gt;zrender&lt;/STRONG&gt; libraries through &lt;STRONG&gt;npm&lt;/STRONG&gt; and end up with required libraries&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eCharts.png" style="width: 260px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/49983i3110203C22785399/image-size/large?v=v2&amp;amp;px=999" role="button" title="eCharts.png" alt="eCharts.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;then later add reference to those &lt;STRONG&gt;node_modules&lt;/STRONG&gt; generated files in a similar way as Ignat mentioned above.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Still in order to be recognized by Power BI, your custom visuals MUST implement the &lt;STRONG&gt;IVisual&lt;/STRONG&gt; interface&lt;BR /&gt;at some stage. The &lt;STRONG&gt;IVisual&lt;/STRONG&gt; interface acts as the main driven engine so to speak.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So from there, you'll basically have two main options:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;1- Either refactor the existing code in TypeScript and manage to recreate the logic.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I would say that not only this approach requires to be fairly comfortable with TypeScript, you must also&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;be able to fully understand how and why original code was created in first place in order to be able to replicate it&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;in another pattern. Remember you're not really reproducing the code "as-is" in this case but rather the logic,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;which is a bit different in this case.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;2- Second option, which I believe would be more convenient in your case - would be taking existing .js code and declare it&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;through a TypeScript d.ts so that Power BI will recognize it.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;This operation may still need a bit of refactoring depending on the complexity of the chart code you're reproducing.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Then from there I imagine you would then need to define a reusable method allowing to call and load the chart&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;on demand - [passing the proper parameters in signature...].&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;In order to allow user to connect data, you would than also would need to define a canonical data representation&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[categorical, table,...] which you'll use through dataViewMapping and use in combination with data conversion method.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Finally for makeup finsihing touch... define a series of objects in capabilities.json&lt;BR /&gt;&lt;BR /&gt;There ain't a lot of code sample available I'm afraid, though one I used as starting ramp was similar to Jon Gallant's 3 part series approach&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;A href="http://blog.jongallant.com/2016/09/how-to-create-power-bi-custom-visual/" target="_blank"&gt;http://blog.jongallant.com/2016/09/how-to-create-power-bi-custom-visual/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Code is taken from an existing d3.js library sample, though it should give you an idea how to manage each configuration steps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If anyone has built a full working echarts sample then be my guest. Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 20:04:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/211555#M6675</guid>
      <dc:creator>MawashiKid</dc:creator>
      <dc:date>2017-07-13T20:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to custom visualization based on echarts?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/212217#M6702</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/5730"&gt;@MawashiKid&lt;/a&gt;&amp;nbsp;Thank yoou for the help.&lt;BR /&gt;&lt;BR /&gt;Seeing these solutions, I tried to go another way and use google.visualizations lib.&lt;BR /&gt;But I still can't doing the visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here, you can see my class visual.ts. The problem is that the code does not pass from the line "&lt;SPAN&gt;google&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;load&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'visualization'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'1.0'&lt;/SPAN&gt;&lt;SPAN&gt;, {&lt;/SPAN&gt;&lt;SPAN&gt;packages:&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;'corechart'&lt;/SPAN&gt;&lt;SPAN&gt;]});"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you help me? Do you see something wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/50168i2D2E96D02DE60B6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks,&lt;/P&gt;&lt;P&gt;JeanPierre.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 16:38:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/212217#M6702</guid>
      <dc:creator>JeanPierre</dc:creator>
      <dc:date>2017-07-14T16:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to custom visualization based on echarts?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/213108#M6725</link>
      <description>&lt;P&gt;Could you please share your source code in order to look into the issue deeper?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 12:49:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/213108#M6725</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-07-17T12:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to custom visualization based on echarts?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/488157#M14963</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks to Ignat for replies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to solve the same thing.&lt;/P&gt;&lt;P&gt;I have installed the ECharts library using npm. Then I added typings of ECharts.&lt;/P&gt;&lt;P&gt;It works good, pbiviz compiles my sources without errors.&lt;/P&gt;&lt;P&gt;But I don't see anything on the developer's visual.&lt;/P&gt;&lt;P&gt;I put my code into try{} statement like:&lt;/P&gt;&lt;PRE&gt;                try {
                    let myChart: ECharts.ECharts;
                    myChart = ECharts.init(chartDiv);
                }
                catch(exc){
                    console.log(exc);
                }&lt;/PRE&gt;&lt;P&gt;Then I have got the error in console: &lt;STRONG&gt;ReferenceError: "ECharts is not defined"&lt;/STRONG&gt;&lt;BR /&gt;Browser does not see a types/declarations. Why?&lt;BR /&gt;What do I wrong?&lt;BR /&gt;Thanks in advance...&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 13:43:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/488157#M14963</guid>
      <dc:creator>rcyber</dc:creator>
      <dc:date>2018-08-13T13:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to custom visualization based on echarts?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/489275#M14991</link>
      <description>&lt;P&gt;Please try to use window["ECharts"] || window.window["ECharts"]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it fails please share source code by sending an email to&amp;nbsp;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 12:16:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Is-it-possible-to-custom-visualization-based-on-echarts/m-p/489275#M14991</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-08-14T12:16:08Z</dc:date>
    </item>
  </channel>
</rss>

