Re: Help on Django + Plotly integration

2023-03-24 Thread Jd Mehra

Create a view that will generate the Plotly chart. In the view, you can use 
the Plotly library to create a chart object and return it as an HTML div 
string. Here is an example view:

from django.shortcuts import render
import plotly.graph_objs as go
import plotly.offline as opy
from django.http import HttpResponse

def my_chart(request):
trace1 = go.Bar(x=[1, 2, 3], y=[4, 5, 6])
data = [trace1]
layout = go.Layout(title='My Chart')
fig = go.Figure(data=data, layout=layout)
div = opy.plot(fig, auto_open=False, output_type='div')
return HttpResponse(div)



On Thursday, 23 March 2023 at 20:20:57 UTC+5:30 Ryan Nowakowski wrote:

> Hey Kumar,
>
> "Not getting the end result" is pretty generic. Where are you stuck 
> specifically? Are there any error messages you're seeing? Have you tried 
> the browser's devtools to see if there are any errors there?
>
> - Ryan
>
>
> On March 23, 2023 6:47:19 AM CDT, Praveen Kumar  
> wrote:
>>
>> Hello Kasper,
>>
>> I have followed following link to get portly chart:
>>
>>
>> https://hackmamba.io/blog/2022/03/quickly-create-interactive-charts-in-django/
>>
>> But I'm not getting end result. Please find below the structure that I 
>> have made. Please let me know if I'm missing anything.
>>
>> [image: Screenshot 2023-03-23 154859.png]
>>
>> Kindly suggest.
>>
>> Thanks & Regards,
>> Praveen
>> On Wednesday, 22 March 2023 at 20:38:55 UTC+5:30 Kasper Laudrup wrote:
>>
>>> On 22/03/2023 15.29, Praveen Kumar wrote: 
>>> > Hi Team, 
>>> > 
>>> > I need help in implementing Plotly with Django for interactive 
>>> dashboards. 
>>> > 
>>> > Please suggest. 
>>> > 
>>>
>>> Try following this: 
>>>
>>> https://googlethatforyou.com?q=plotly%20django 
>>>
>>> Kind regards, 
>>>
>>> Kasper Laudrup 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/21e8e33f-6105-4d0e-8e1d-3f13a0794294n%40googlegroups.com.


Re: Help on Django + Plotly integration

2023-03-23 Thread Praveen Kumar
Hello Kasper,

I have followed following link to get portly chart:

https://hackmamba.io/blog/2022/03/quickly-create-interactive-charts-in-django/

But I'm not getting end result. Please find below the structure that I have 
made. Please let me know if I'm missing anything.

[image: Screenshot 2023-03-23 154859.png]

Kindly suggest.

Thanks & Regards,
Praveen
On Wednesday, 22 March 2023 at 20:38:55 UTC+5:30 Kasper Laudrup wrote:

> On 22/03/2023 15.29, Praveen Kumar wrote:
> > Hi Team,
> > 
> > I need help in implementing Plotly with Django for interactive 
> dashboards.
> > 
> > Please suggest.
> >
>
> Try following this:
>
> https://googlethatforyou.com?q=plotly%20django
>
> Kind regards,
>
> Kasper Laudrup
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ce2cb442-378f-461a-b511-712db359b8b7n%40googlegroups.com.


Re: Help on Django + Plotly integration

2023-03-22 Thread 'Kasper Laudrup' via Django users

On 22/03/2023 15.29, Praveen Kumar wrote:

Hi Team,

I need help in implementing Plotly with Django for interactive dashboards.

Please suggest.



Try following this:

https://googlethatforyou.com?q=plotly%20django

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/93cd0647-cf85-e209-07f0-580c72a84cc2%40stacktrace.dk.


OpenPGP_0xE5D9CAC64AAA55EB.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Help on Django + Plotly integration

2023-03-22 Thread Praveen Kumar
Hi Team,

I need help in implementing Plotly with Django for interactive dashboards.

Please suggest.

Thanks & Regards,
Praveen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f4a11d66-f269-4e02-b3fe-a056d4a972ecn%40googlegroups.com.