tkchart -> Create Chart in tkinter windows
Project description
tkchart package
create line chart in tkinter & customtkinter windows
package requirement :
tkinter
customtkinter
You must install these packages before using this
tkinter - pip install tk
customtkinter - pip install customtkinter
you can configure >>
attributes
LineChart Object Configurations
master : master of chart
master = frame1 | master = root
width : width of chart
width = 500
height : height of chart
height = 500
sections : show sections of chart
sections = True | sections = False
sections_fg : color of sections
sections_fg = "red" | sections_fg = "#ff0000"
sections_count : no of sections
sections_count = 10
chart_bg : backgroud color of chart
chart_bg = "red" | chart_bg = "#ff0000"
chart_fg : foreground color of chart
chart_fg = "red" | chart_fg = "#ff0000"
horizontal_bar_fg : horizontal bar color
horizontal_bar_fg = "red" | horizontal_bar_fg = "#ff0000"
horizontal_bar_size : horizontal bar size
horizontal_bar_size = 10
vertical_bar_fg : vertical bar color
vertical_bar_fg = "red" | vertical_bar_fg = "#ff0000"
vertical_bar_size : verticak bar size
verticak_bar_size = 10
text_color : colors of texts in chart
text_color = "red" | text_color = "#ff0000"
font : font configure in chart
font = ('arial',15,'bold')
values_labels : show values of labels
values_labels = True | values_labels = False
values_labels_count : no. of labels
values_labels_count = 10
chart_line_len : length of chart line
chart_line_len = 10
max_value : maximum display value
max_value = 1800
configure spaces
top_space :
top_space = 20
bottom_space :
bottom_space = 20
right_space :
right_space = 20
right_space :
right_space = 20
x_space :
x_space = 100
y_space :
y_space = 100
Line Object Configurations
height : height of chart
height = 1
color : color of line
color = "#101010" | color= "black"
create Chart
#import module
import tkchart
import customtkinter
#create root
root = customtkinter.TCk()
#create chart
chart_1 = tkchart.LineChart(master=root
,width=1280 ,height=720
,chart_fg='#050505'
,horizontal_bar_size=15
,vertical_bar_size=15
,sections=True ,sections_fg="#202020" ,sections_count=5
,max_value=100
,values_labels=True ,values_labels_count=10
,chart_line_len=80
,text_color='#808080' ,font=('arial',10,'bold')
,left_space=100 ,right_space=100 ,bottom_space=40 ,top_space=40
,x_space=100 ,y_space=100)
#place / grid / pack chart ## same as tkinter place / grid / pack
#important place -> relwidth & relheight not supported in chart
chart_1.pack()
#create line for chart
line_1 = tkchart.Line(master=chart_1 ,height=4 ,color='#909090')
# after creating line on chart , you can display values caling like this
chart_1.display(line=line_1 ,values=[100,50,90,10,100,90,75,10,70,1,100,90,75,10,700])
root.mainloop()
after create chart_1 you can change attributes of chart by configure like this
chart_1.configure(width=1000 ,height=450 ,chart_bg="#101010" ,chart_fg="#101010".....)
you can reset chart after display values
char_1.reset()
after create line you can change attributes of line by configure like this
line_1.configure(height=2 ,color=red)
More Infomations :- https://github.com/Thisal-D/tkchart
## This is a tkchart package. Thanks For Using..!👌
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tkchart-0.0.3.1.tar.gz
.
File metadata
- Download URL: tkchart-0.0.3.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3373522ed3164d355a5e98bcc386ce60c00f9e6da7226eea080a44710b4503a |
|
MD5 | 1ac35c7bec2837e88af255720043cd6f |
|
BLAKE2b-256 | 8e981fb387efd36745987aef92a96446828323a926eab34e6dcbda512dc577a0 |
Provenance
File details
Details for the file tkchart-0.0.3.1-py3-none-any.whl
.
File metadata
- Download URL: tkchart-0.0.3.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21688346075f9bad4c2b01ba56364383a96c65f0f94c9bc3d36906cd7f87fc47 |
|
MD5 | 92bc25255fe1fdaa05828d14277a5503 |
|
BLAKE2b-256 | cf0772ff715b1ffecdbb9310bc91a988178f1d1891b7cc591f0ed3f83c77d72e |