You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by Axel Dahl <ax...@whisperstream.com> on 2015/07/16 05:47:04 UTC
google charts for zeppelin
Hi,
I was trying to integrate google charts (
https://developers.google.com/chart/) into zeppelin.
>From %pyspark I was hoping I could just do:
print """%html
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1.0', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);
.
.
.
"""
But when I do that and run the paragraph, zeppelin just gives me a
blank white screen and appears to lose the web socket connection. I
also found moon's chart repo here:
https://github.com/NFLabs/zeppelin-gchart. But not sure how it
integrates into the existing code base. Has anyone else achieved a
gcharts integration or does anyone else know why I get the blank
screen and how to avoid it?
Thanks,
-Axel
Re: google charts for zeppelin
Posted by Axel Dahl <ax...@whisperstream.com>.
I just tried various examples from the google charts website, e.g..:
https://developers.google.com/chart/interactive/docs/quick_start
https://developers.google.com/chart/interactive/docs/gallery/linechart
On Fri, Jul 17, 2015 at 9:59 AM, Corneau Damien <co...@gmail.com>
wrote:
> You also miss a </script> tag at the end.
> (If it was the full code).
>
> Could you share all the code if it wasn't? I will try to make it work
> On Jul 17, 2015 11:37 PM, "Axel Dahl" <ax...@whisperstream.com> wrote:
>
>> Thanks Corneau,
>>
>> tried that, but get same result as when using "%html". Will have a look
>> at the links madhuka provided and go through that code.
>>
>> -Axel
>>
>> On Wed, Jul 15, 2015 at 11:54 PM, Corneau Damien <co...@gmail.com>
>> wrote:
>>
>>> Try to replace print(%html by print(%angular
>>>
>>> as %html is not 'running' js, while %angular is
>>>
>>>
>>> On Thu, Jul 16, 2015 at 1:29 PM, madhuka udantha <
>>> madhukaudantha@gmail.com> wrote:
>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: madhuka udantha <ma...@gmail.com>
>>>> Date: Thu, Jul 16, 2015 at 9:44 AM
>>>> Subject: Re: google charts for zeppelin
>>>> To: Alexander Bezzubov <ab...@nflabs.com>
>>>> Cc: users@zeppelin.incubator.apache.org
>>>>
>>>>
>>>> Hi,
>>>>
>>>> You can added google chart for zeppelin. But it is not straightforward
>>>> still.
>>>> I have added new library (leaflet js - GIS / mapping library) for
>>>> zeppelin[1] in PR. You can see the steps that I have followed in there, do
>>>> the same for google chart.
>>>>
>>>> Here is another repo[2], that I have used Google chart, High chart and
>>>> NVD3 chart.
>>>>
>>>> [1] https://github.com/apache/incubator-zeppelin/pull/152
>>>> [2] https://github.com/Madhuka/apache-zeppelin-gsoc
>>>>
>>>> On Thu, Jul 16, 2015 at 9:25 AM, Alexander Bezzubov <
>>>> abezzubov@nflabs.com> wrote:
>>>>
>>>>> Hi Axel,
>>>>>
>>>>> I think the repo you are pointing out is outdated and is not useful
>>>>> for the current Apache Zeppelin (incubating) codebase.
>>>>>
>>>>> That being said, there is an engineer here on the list, Madhuka (in
>>>>> CC) who is working on adding more charts to Zeppelin i.e
>>>>> https://issues.apache.org/jira/browse/ZEPPELIN-157
>>>>>
>>>>> AFIAK recently he has been experimenting with GCharts, so I wonder if
>>>>> he can chime in and help you here.
>>>>>
>>>>> Hope this helps!
>>>>>
>>>>> --
>>>>> Kind regards,
>>>>> Alex
>>>>>
>>>>> On Thu, Jul 16, 2015 at 12:47 PM, Axel Dahl <ax...@whisperstream.com>
>>>>> wrote:
>>>>> > Hi,
>>>>> >
>>>>> > I was trying to integrate google charts
>>>>> > (https://developers.google.com/chart/) into zeppelin.
>>>>> >
>>>>> > From %pyspark I was hoping I could just do:
>>>>> >
>>>>> > print """%html
>>>>> >
>>>>> > <!--Load the AJAX API-->
>>>>> > <script type="text/javascript"
>>>>> > src="https://www.google.com/jsapi"></script>
>>>>> > <script type="text/javascript">
>>>>> >
>>>>> > // Load the Visualization API and the piechart package.
>>>>> > google.load('visualization', '1.0',
>>>>> {'packages':['corechart']});
>>>>> >
>>>>> > // Set a callback to run when the Google Visualization API is
>>>>> loaded.
>>>>> > google.setOnLoadCallback(drawChart);
>>>>> >
>>>>> > .
>>>>> >
>>>>> > .
>>>>> >
>>>>> > .
>>>>> >
>>>>> > """
>>>>> >
>>>>> > But when I do that and run the paragraph, zeppelin just gives me a
>>>>> blank
>>>>> > white screen and appears to lose the web socket connection. I also
>>>>> found
>>>>> > moon's chart repo here: https://github.com/NFLabs/zeppelin-gchart.
>>>>> But not
>>>>> > sure how it integrates into the existing code base. Has anyone else
>>>>> > achieved a gcharts integration or does anyone else know why I get
>>>>> the blank
>>>>> > screen and how to avoid it?
>>>>> >
>>>>> >
>>>>> > Thanks,
>>>>> >
>>>>> >
>>>>> > -Axel
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> Kind regards,
>>>>> Alexander.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Cheers,
>>>> Madhuka Udantha
>>>> http://madhukaudantha.blogspot.com
>>>>
>>>>
>>>>
>>>> --
>>>> Cheers,
>>>> Madhuka Udantha
>>>> http://madhukaudantha.blogspot.com
>>>>
>>>
>>>
>>
Re: google charts for zeppelin
Posted by Corneau Damien <co...@gmail.com>.
You also miss a </script> tag at the end.
(If it was the full code).
Could you share all the code if it wasn't? I will try to make it work
On Jul 17, 2015 11:37 PM, "Axel Dahl" <ax...@whisperstream.com> wrote:
> Thanks Corneau,
>
> tried that, but get same result as when using "%html". Will have a look
> at the links madhuka provided and go through that code.
>
> -Axel
>
> On Wed, Jul 15, 2015 at 11:54 PM, Corneau Damien <co...@gmail.com>
> wrote:
>
>> Try to replace print(%html by print(%angular
>>
>> as %html is not 'running' js, while %angular is
>>
>>
>> On Thu, Jul 16, 2015 at 1:29 PM, madhuka udantha <
>> madhukaudantha@gmail.com> wrote:
>>
>>>
>>> ---------- Forwarded message ----------
>>> From: madhuka udantha <ma...@gmail.com>
>>> Date: Thu, Jul 16, 2015 at 9:44 AM
>>> Subject: Re: google charts for zeppelin
>>> To: Alexander Bezzubov <ab...@nflabs.com>
>>> Cc: users@zeppelin.incubator.apache.org
>>>
>>>
>>> Hi,
>>>
>>> You can added google chart for zeppelin. But it is not straightforward
>>> still.
>>> I have added new library (leaflet js - GIS / mapping library) for
>>> zeppelin[1] in PR. You can see the steps that I have followed in there, do
>>> the same for google chart.
>>>
>>> Here is another repo[2], that I have used Google chart, High chart and
>>> NVD3 chart.
>>>
>>> [1] https://github.com/apache/incubator-zeppelin/pull/152
>>> [2] https://github.com/Madhuka/apache-zeppelin-gsoc
>>>
>>> On Thu, Jul 16, 2015 at 9:25 AM, Alexander Bezzubov <
>>> abezzubov@nflabs.com> wrote:
>>>
>>>> Hi Axel,
>>>>
>>>> I think the repo you are pointing out is outdated and is not useful
>>>> for the current Apache Zeppelin (incubating) codebase.
>>>>
>>>> That being said, there is an engineer here on the list, Madhuka (in
>>>> CC) who is working on adding more charts to Zeppelin i.e
>>>> https://issues.apache.org/jira/browse/ZEPPELIN-157
>>>>
>>>> AFIAK recently he has been experimenting with GCharts, so I wonder if
>>>> he can chime in and help you here.
>>>>
>>>> Hope this helps!
>>>>
>>>> --
>>>> Kind regards,
>>>> Alex
>>>>
>>>> On Thu, Jul 16, 2015 at 12:47 PM, Axel Dahl <ax...@whisperstream.com>
>>>> wrote:
>>>> > Hi,
>>>> >
>>>> > I was trying to integrate google charts
>>>> > (https://developers.google.com/chart/) into zeppelin.
>>>> >
>>>> > From %pyspark I was hoping I could just do:
>>>> >
>>>> > print """%html
>>>> >
>>>> > <!--Load the AJAX API-->
>>>> > <script type="text/javascript"
>>>> > src="https://www.google.com/jsapi"></script>
>>>> > <script type="text/javascript">
>>>> >
>>>> > // Load the Visualization API and the piechart package.
>>>> > google.load('visualization', '1.0', {'packages':['corechart']});
>>>> >
>>>> > // Set a callback to run when the Google Visualization API is
>>>> loaded.
>>>> > google.setOnLoadCallback(drawChart);
>>>> >
>>>> > .
>>>> >
>>>> > .
>>>> >
>>>> > .
>>>> >
>>>> > """
>>>> >
>>>> > But when I do that and run the paragraph, zeppelin just gives me a
>>>> blank
>>>> > white screen and appears to lose the web socket connection. I also
>>>> found
>>>> > moon's chart repo here: https://github.com/NFLabs/zeppelin-gchart.
>>>> But not
>>>> > sure how it integrates into the existing code base. Has anyone else
>>>> > achieved a gcharts integration or does anyone else know why I get the
>>>> blank
>>>> > screen and how to avoid it?
>>>> >
>>>> >
>>>> > Thanks,
>>>> >
>>>> >
>>>> > -Axel
>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Kind regards,
>>>> Alexander.
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Madhuka Udantha
>>> http://madhukaudantha.blogspot.com
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Madhuka Udantha
>>> http://madhukaudantha.blogspot.com
>>>
>>
>>
>
Re: google charts for zeppelin
Posted by Axel Dahl <ax...@whisperstream.com>.
Thanks Corneau,
tried that, but get same result as when using "%html". Will have a look at
the links madhuka provided and go through that code.
-Axel
On Wed, Jul 15, 2015 at 11:54 PM, Corneau Damien <co...@gmail.com>
wrote:
> Try to replace print(%html by print(%angular
>
> as %html is not 'running' js, while %angular is
>
>
> On Thu, Jul 16, 2015 at 1:29 PM, madhuka udantha <madhukaudantha@gmail.com
> > wrote:
>
>>
>> ---------- Forwarded message ----------
>> From: madhuka udantha <ma...@gmail.com>
>> Date: Thu, Jul 16, 2015 at 9:44 AM
>> Subject: Re: google charts for zeppelin
>> To: Alexander Bezzubov <ab...@nflabs.com>
>> Cc: users@zeppelin.incubator.apache.org
>>
>>
>> Hi,
>>
>> You can added google chart for zeppelin. But it is not straightforward
>> still.
>> I have added new library (leaflet js - GIS / mapping library) for
>> zeppelin[1] in PR. You can see the steps that I have followed in there, do
>> the same for google chart.
>>
>> Here is another repo[2], that I have used Google chart, High chart and
>> NVD3 chart.
>>
>> [1] https://github.com/apache/incubator-zeppelin/pull/152
>> [2] https://github.com/Madhuka/apache-zeppelin-gsoc
>>
>> On Thu, Jul 16, 2015 at 9:25 AM, Alexander Bezzubov <abezzubov@nflabs.com
>> > wrote:
>>
>>> Hi Axel,
>>>
>>> I think the repo you are pointing out is outdated and is not useful
>>> for the current Apache Zeppelin (incubating) codebase.
>>>
>>> That being said, there is an engineer here on the list, Madhuka (in
>>> CC) who is working on adding more charts to Zeppelin i.e
>>> https://issues.apache.org/jira/browse/ZEPPELIN-157
>>>
>>> AFIAK recently he has been experimenting with GCharts, so I wonder if
>>> he can chime in and help you here.
>>>
>>> Hope this helps!
>>>
>>> --
>>> Kind regards,
>>> Alex
>>>
>>> On Thu, Jul 16, 2015 at 12:47 PM, Axel Dahl <ax...@whisperstream.com>
>>> wrote:
>>> > Hi,
>>> >
>>> > I was trying to integrate google charts
>>> > (https://developers.google.com/chart/) into zeppelin.
>>> >
>>> > From %pyspark I was hoping I could just do:
>>> >
>>> > print """%html
>>> >
>>> > <!--Load the AJAX API-->
>>> > <script type="text/javascript"
>>> > src="https://www.google.com/jsapi"></script>
>>> > <script type="text/javascript">
>>> >
>>> > // Load the Visualization API and the piechart package.
>>> > google.load('visualization', '1.0', {'packages':['corechart']});
>>> >
>>> > // Set a callback to run when the Google Visualization API is
>>> loaded.
>>> > google.setOnLoadCallback(drawChart);
>>> >
>>> > .
>>> >
>>> > .
>>> >
>>> > .
>>> >
>>> > """
>>> >
>>> > But when I do that and run the paragraph, zeppelin just gives me a
>>> blank
>>> > white screen and appears to lose the web socket connection. I also
>>> found
>>> > moon's chart repo here: https://github.com/NFLabs/zeppelin-gchart.
>>> But not
>>> > sure how it integrates into the existing code base. Has anyone else
>>> > achieved a gcharts integration or does anyone else know why I get the
>>> blank
>>> > screen and how to avoid it?
>>> >
>>> >
>>> > Thanks,
>>> >
>>> >
>>> > -Axel
>>>
>>>
>>>
>>> --
>>> --
>>> Kind regards,
>>> Alexander.
>>>
>>
>>
>>
>> --
>> Cheers,
>> Madhuka Udantha
>> http://madhukaudantha.blogspot.com
>>
>>
>>
>> --
>> Cheers,
>> Madhuka Udantha
>> http://madhukaudantha.blogspot.com
>>
>
>
Re: google charts for zeppelin
Posted by Corneau Damien <co...@gmail.com>.
Try to replace print(%html by print(%angular
as %html is not 'running' js, while %angular is
On Thu, Jul 16, 2015 at 1:29 PM, madhuka udantha <ma...@gmail.com>
wrote:
>
> ---------- Forwarded message ----------
> From: madhuka udantha <ma...@gmail.com>
> Date: Thu, Jul 16, 2015 at 9:44 AM
> Subject: Re: google charts for zeppelin
> To: Alexander Bezzubov <ab...@nflabs.com>
> Cc: users@zeppelin.incubator.apache.org
>
>
> Hi,
>
> You can added google chart for zeppelin. But it is not straightforward
> still.
> I have added new library (leaflet js - GIS / mapping library) for
> zeppelin[1] in PR. You can see the steps that I have followed in there, do
> the same for google chart.
>
> Here is another repo[2], that I have used Google chart, High chart and
> NVD3 chart.
>
> [1] https://github.com/apache/incubator-zeppelin/pull/152
> [2] https://github.com/Madhuka/apache-zeppelin-gsoc
>
> On Thu, Jul 16, 2015 at 9:25 AM, Alexander Bezzubov <ab...@nflabs.com>
> wrote:
>
>> Hi Axel,
>>
>> I think the repo you are pointing out is outdated and is not useful
>> for the current Apache Zeppelin (incubating) codebase.
>>
>> That being said, there is an engineer here on the list, Madhuka (in
>> CC) who is working on adding more charts to Zeppelin i.e
>> https://issues.apache.org/jira/browse/ZEPPELIN-157
>>
>> AFIAK recently he has been experimenting with GCharts, so I wonder if
>> he can chime in and help you here.
>>
>> Hope this helps!
>>
>> --
>> Kind regards,
>> Alex
>>
>> On Thu, Jul 16, 2015 at 12:47 PM, Axel Dahl <ax...@whisperstream.com>
>> wrote:
>> > Hi,
>> >
>> > I was trying to integrate google charts
>> > (https://developers.google.com/chart/) into zeppelin.
>> >
>> > From %pyspark I was hoping I could just do:
>> >
>> > print """%html
>> >
>> > <!--Load the AJAX API-->
>> > <script type="text/javascript"
>> > src="https://www.google.com/jsapi"></script>
>> > <script type="text/javascript">
>> >
>> > // Load the Visualization API and the piechart package.
>> > google.load('visualization', '1.0', {'packages':['corechart']});
>> >
>> > // Set a callback to run when the Google Visualization API is
>> loaded.
>> > google.setOnLoadCallback(drawChart);
>> >
>> > .
>> >
>> > .
>> >
>> > .
>> >
>> > """
>> >
>> > But when I do that and run the paragraph, zeppelin just gives me a blank
>> > white screen and appears to lose the web socket connection. I also
>> found
>> > moon's chart repo here: https://github.com/NFLabs/zeppelin-gchart.
>> But not
>> > sure how it integrates into the existing code base. Has anyone else
>> > achieved a gcharts integration or does anyone else know why I get the
>> blank
>> > screen and how to avoid it?
>> >
>> >
>> > Thanks,
>> >
>> >
>> > -Axel
>>
>>
>>
>> --
>> --
>> Kind regards,
>> Alexander.
>>
>
>
>
> --
> Cheers,
> Madhuka Udantha
> http://madhukaudantha.blogspot.com
>
>
>
> --
> Cheers,
> Madhuka Udantha
> http://madhukaudantha.blogspot.com
>
Fwd: google charts for zeppelin
Posted by madhuka udantha <ma...@gmail.com>.
---------- Forwarded message ----------
From: madhuka udantha <ma...@gmail.com>
Date: Thu, Jul 16, 2015 at 9:44 AM
Subject: Re: google charts for zeppelin
To: Alexander Bezzubov <ab...@nflabs.com>
Cc: users@zeppelin.incubator.apache.org
Hi,
You can added google chart for zeppelin. But it is not straightforward
still.
I have added new library (leaflet js - GIS / mapping library) for
zeppelin[1] in PR. You can see the steps that I have followed in there, do
the same for google chart.
Here is another repo[2], that I have used Google chart, High chart and NVD3
chart.
[1] https://github.com/apache/incubator-zeppelin/pull/152
[2] https://github.com/Madhuka/apache-zeppelin-gsoc
On Thu, Jul 16, 2015 at 9:25 AM, Alexander Bezzubov <ab...@nflabs.com>
wrote:
> Hi Axel,
>
> I think the repo you are pointing out is outdated and is not useful
> for the current Apache Zeppelin (incubating) codebase.
>
> That being said, there is an engineer here on the list, Madhuka (in
> CC) who is working on adding more charts to Zeppelin i.e
> https://issues.apache.org/jira/browse/ZEPPELIN-157
>
> AFIAK recently he has been experimenting with GCharts, so I wonder if
> he can chime in and help you here.
>
> Hope this helps!
>
> --
> Kind regards,
> Alex
>
> On Thu, Jul 16, 2015 at 12:47 PM, Axel Dahl <ax...@whisperstream.com>
> wrote:
> > Hi,
> >
> > I was trying to integrate google charts
> > (https://developers.google.com/chart/) into zeppelin.
> >
> > From %pyspark I was hoping I could just do:
> >
> > print """%html
> >
> > <!--Load the AJAX API-->
> > <script type="text/javascript"
> > src="https://www.google.com/jsapi"></script>
> > <script type="text/javascript">
> >
> > // Load the Visualization API and the piechart package.
> > google.load('visualization', '1.0', {'packages':['corechart']});
> >
> > // Set a callback to run when the Google Visualization API is
> loaded.
> > google.setOnLoadCallback(drawChart);
> >
> > .
> >
> > .
> >
> > .
> >
> > """
> >
> > But when I do that and run the paragraph, zeppelin just gives me a blank
> > white screen and appears to lose the web socket connection. I also found
> > moon's chart repo here: https://github.com/NFLabs/zeppelin-gchart. But
> not
> > sure how it integrates into the existing code base. Has anyone else
> > achieved a gcharts integration or does anyone else know why I get the
> blank
> > screen and how to avoid it?
> >
> >
> > Thanks,
> >
> >
> > -Axel
>
>
>
> --
> --
> Kind regards,
> Alexander.
>
--
Cheers,
Madhuka Udantha
http://madhukaudantha.blogspot.com
--
Cheers,
Madhuka Udantha
http://madhukaudantha.blogspot.com
Re: google charts for zeppelin
Posted by Alexander Bezzubov <ab...@nflabs.com>.
Hi Axel,
I think the repo you are pointing out is outdated and is not useful
for the current Apache Zeppelin (incubating) codebase.
That being said, there is an engineer here on the list, Madhuka (in
CC) who is working on adding more charts to Zeppelin i.e
https://issues.apache.org/jira/browse/ZEPPELIN-157
AFIAK recently he has been experimenting with GCharts, so I wonder if
he can chime in and help you here.
Hope this helps!
--
Kind regards,
Alex
On Thu, Jul 16, 2015 at 12:47 PM, Axel Dahl <ax...@whisperstream.com> wrote:
> Hi,
>
> I was trying to integrate google charts
> (https://developers.google.com/chart/) into zeppelin.
>
> From %pyspark I was hoping I could just do:
>
> print """%html
>
> <!--Load the AJAX API-->
> <script type="text/javascript"
> src="https://www.google.com/jsapi"></script>
> <script type="text/javascript">
>
> // Load the Visualization API and the piechart package.
> google.load('visualization', '1.0', {'packages':['corechart']});
>
> // Set a callback to run when the Google Visualization API is loaded.
> google.setOnLoadCallback(drawChart);
>
> .
>
> .
>
> .
>
> """
>
> But when I do that and run the paragraph, zeppelin just gives me a blank
> white screen and appears to lose the web socket connection. I also found
> moon's chart repo here: https://github.com/NFLabs/zeppelin-gchart. But not
> sure how it integrates into the existing code base. Has anyone else
> achieved a gcharts integration or does anyone else know why I get the blank
> screen and how to avoid it?
>
>
> Thanks,
>
>
> -Axel
--
--
Kind regards,
Alexander.