In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "Django2.2+plotly Visualization data implementation Line Chart". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Reference article
1 https://www.codingwithricky.com/2019/08/28/easy-django-plotly/
2 https://plotly.com/python/box-plots/
3 https://github.com/ricleal/DjangoPlotLy/tree/master/site1
This is an app written by Django. It's worth looking at carefully.
4 https://towardsdatascience.com/how-to-create-a-plotly-visualization-and-embed-it-on-websites-517c1a78568b
5 https://medium.com/better-programming/prettify-python-django-with-beautiful-visual-charts-836fe6646305
Update plotlypip install-- upgrade plotly
Create a project and appdjango-admin startproject django_plotly
Cd django_plotly
Python manage.py startapp boxplot
Set up url add template
View function
Rom django.shortcuts import render
From plotly.offline import plot
From plotly.graph_objs import Scatter
# Create your views here.
Def index (request):
X_data = [0Jing 1pm 2JI 3]
Y_data = [xylene 2 for x in x_data]
Data = Scatter (xchangxroomdatamemorialityplayplaydatamemorialityplayplaydatamemorialityplayplaydatagradityredityredity08reparation.co.com.cn.
Plot_div = plot ([data], output_type='div')
Context = {'plot_div':plot_div}
Return render (request,'boxplot/index.html',context=context)
Html code
A simple line chart
How are you?
{{plot_div | safe}}
I'm fine!
The rendering result of the web page
The content of "Django2.2+plotly Visualization data realization Line Chart" is introduced here. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.