current position:Home>[Django CI system] echarts dataset standard writing - 20220509
[Django CI system] echarts dataset standard writing - 20220509
2022-05-15 03:36:34【i see the future】
echarts Of dataset Standard writing
option = {
dataset: [
{
dimensions: ['name', 'score'],
source: [
['Hannah Krause', 41,],
['Zhao Qian', 20, ],
['Jasmin Krause ', 52,],
]
},
{
transform: {
type: 'sort',
config: {
dimension: 'score', order: 'desc' }
}
}
],
title: {
text: 'Referer of a Website',
subtext: 'Fake Data',
left: 'center'
},
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical',
left: 'left'
},
series: [
{
name: 'Access From',
type: 'pie',
radius: '50%',
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
Back end construction dataset
The output of the following function conforms to dataset The format of :
json.dumps(value12A) [[‘ Process quality department ’, 4], [‘ General personnel department ’, 1], [‘ Product R & D department ’, 1], [‘ Logistics Department ’, 1], [‘ The operation Department of the general manager's office ’, 3], [‘ raw Foaming production ’, 1], [‘ Production assembly ’, 1], [‘EHS’, 1], [‘ Finance Department &IT’, 2]]
# main12 Parameter extraction
list_of_dept_review_count = []
dict_of_sum_dept_review_count = {
}
for de in dept_review.objects.all():
list_of_dept_review_count.append(de.dept_review_suggestion_dept_reviewer)
for each_dept in list_of_dept_review_count:
dept_sum = dept_review.objects.filter(Q(dept_review_suggestion_dept_reviewer=each_dept) & Q(dept_review_suggestion_finished_review=' Approved ')).aggregate(each_dept=Count('dept_review_suggestion_employee_id'))
process_dict = {
each_dept : dept_sum['each_dept']}
dict_of_sum_dept_review_count.update(process_dict)
print('dict_of_sum_dept_review_count',dict_of_sum_dept_review_count) #{' Process quality department ': 5, ' The operation Department of the general manager's office ': 1}
value12A = []
for key,value in dict_of_sum_suggestion_dept_count.items():
listA = []
listA.append(key)
listA.append(value)
value12A.append(listA)
print('json.dumps(value12A)',json.dumps(value12A))
print('json.dumps(value12A)',json.loads(json.dumps(value12A)))
copyright notice
author[i see the future],Please bring the original link to reprint, thank you.
https://en.pythonmana.com/2022/131/202205111536124412.html
The sidebar is recommended
- [brush question Python] the problem of cutting and selling pipes to maximize profits
- Python regular expression
- [Python GUI] wxPython automated data generator practice
- Python script compilation process
- [Python faiss library] (I) Introduction
- Python moves (copies) the pictures (files) under one file to another folder
- Python crawling 51job position information (regular violence matching)
- Python Post Bar irrigation script
- Python simulation QR code login Baidu
- Python calls wechat to send message call through COM port
guess what you like
Analysis of birthday paradox in Python
Equal scale compression of image files in Python
Python dynamic programming (knapsack problem and longest common substring)
Introduction to Python Programming and data analysis (I) basic use of built-in functions
Introduction to Python Programming and data analysis (II) basic use of list derivation
Introduction to Python Programming and data analysis (III) basic use of branch and process control
Python turtle painting Chinese characters
[a quick introduction and comparison of multiple languages -- JavaScript, typescript, python, golang, trust, Java, ruby]
Relevant knowledge of Python web development (I)
python3. Understanding of ID function in 6
Random recommended
- JSON data storage of MySQL in Python
- Python 3 development function
- My pandas
- Python game programming (pyGame)
- Python word cloud
- Python crawler crawls the Douban movie ranking list and writes it into CSV file for visual data analysis
- Python crawler crawls Beijing Xinfadi vegetables and displays them visually
- Python climbed the world university rankings
- Python crawling material commune picture
- Exception handling in Python and explanation of OS module
- Summation of corresponding position elements of multiple lists in Python
- [Python pandas] read excel table contents
- Python zip() function usage
- Application of Python startup subclass subprocess class
- Python's logging module
- MySQL application of Python
- Interesting games designed in Python
- Regularity of Python
- Build Python project in Jenkins, pychar output is normal and Jenkins output modulenotfounderror: no module named problem
- Jenkins reported an error in building Python project: CX_ Oracle. DatabaseError: DPI-1047: oci. dll is not the correct architecture
- Interface request processing of Python webservice
- Hamcrest assertion Library of Python
- Download third-party libraries offline in Python
- Web automation in Python
- Importlib.exe in Python import_ Module import module
- Operation of OS Library in Python
- Some integration operations on Web pages in Python
- Python realizes the super fast window screenshot, automatically obtains the current active window and displays the screenshot
- Implementation of workstation monitoring system with Python socket
- Resume Automation - word 92
- Django foundation -- 02 small project based on Database
- Python drawing word cloud
- Django foundation -- 02 small project based on Database
- MNIST dataset classification based on Python
- Design of FTP client server based on Python
- Signing using RSA algorithm based on Python
- Website backend of online book purchase function based on Python
- Implementation of Tetris game based on Python greedy search
- Django Foundation
- Case: Python weather broadcast system, this is a rainy day