Skip to content

Commit

Permalink
version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisal-D committed Jan 2, 2025
1 parent a42f0a5 commit 0ef2da8
Show file tree
Hide file tree
Showing 29 changed files with 2,447 additions and 536 deletions.
1,013 changes: 716 additions & 297 deletions README.md

Large diffs are not rendered by default.

796 changes: 796 additions & 0 deletions README_CN.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Tests/Main - Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
line_chart = ctkchart.CTkLineChart(master=root, fg_color=("#FFFFFF","#101010"), bg_color=("#ffffff","#101010"),
width=900, height=350,x_axis_section_color=("#aaaaaa","green"),y_axis_section_color=("#aaaaaa","green"),
x_axis_data="X-AXIS", y_axis_data="Y-AXIS",x_axis_data_position="side",
axis_size=1, y_axis_precision=0,
axis_size=1, y_axis_precision=0,
x_axis_values=x_axis_values, y_axis_values=(0, 1000),
x_axis_label_count=20, y_axis_label_count=10,
x_axis_section_count=10, y_axis_section_count=10,
y_space=10, x_space=10)
line_chart.pack()

line = ctkchart.CTkLine(master=line_chart, style="dashed", style_type=(10,5), size=1, color=("#404040", "lightblue"),
line = ctkchart.CTkLine(master=line_chart, style="dashed", style_type=(10,5), size=1, color=("#404040", "lightblue"), fill="enabled",
point_highlight="enabled", point_highlight_size=5, point_highlight_color=("#404040", "lightblue"))

def loop():
Expand Down
19 changes: 19 additions & 0 deletions examples/ex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import ctkchart
import customtkinter as ctk




tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=(2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C"))
chart.pack()

line = ctkchart.CTkLine(master=chart)

chart.show_data(line=line, data=[0,-100,10,90,-10,76,20,-54,100])

tk.mainloop()
22 changes: 22 additions & 0 deletions examples/ex10.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import ctkchart
import customtkinter as ctk


tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=tuple([x for x in range(2018,2026,1)]),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C")

)

chart.pack()

line = ctkchart.CTkLine(master=chart, size=5, color="#30acc7")
import random

chart.show_data(line=line, data=[0,-100,10,90,-10,76,20,-54,100])


tk.mainloop()
28 changes: 28 additions & 0 deletions examples/ex11.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import ctkchart
import customtkinter as ctk


tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=tuple([x for x in range(2018,2026,1)]),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C")

)

chart.pack()

line = ctkchart.CTkLine(master=chart, size=3, style="dashed", style_type=(20,10))
line2 = ctkchart.CTkLine(master=chart, size=3, style="normal", style_type=(20,10))
line3 = ctkchart.CTkLine(master=chart, size=3, style="dotted", style_type=(8,10))


import random

chart.show_data(line=line3, data=[-30]*10)
chart.show_data(line=line, data=[20]*10)
chart.show_data(line=line2, data=[80]*10)


tk.mainloop()
31 changes: 31 additions & 0 deletions examples/ex12.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import ctkchart
import customtkinter as ctk


tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=tuple([x for x in range(2018,2026,1)]),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C")

)

chart.pack()

line = ctkchart.CTkLine(master=chart, size=3, style="dashed", style_type=(10,2))
line2 = ctkchart.CTkLine(master=chart, size=3, style="dashed", style_type=(6,20))
line3 = ctkchart.CTkLine(master=chart, size=3, style="dotted", style_type=(6,3))
line4 = ctkchart.CTkLine(master=chart, size=3, style="dotted", style_type=(3,6))



import random

chart.show_data(line=line, data=[90]*10)
chart.show_data(line=line2, data=[40]*10)
chart.show_data(line=line3, data=[0]*10)
chart.show_data(line=line4, data=[-40]*10)


tk.mainloop()
24 changes: 24 additions & 0 deletions examples/ex13.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import ctkchart
import customtkinter as ctk


tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=tuple([x for x in range(2018,2026,1)]),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C")

)

chart.pack()

line = ctkchart.CTkLine(master=chart, style="normal" ,point_highlight="enabled", point_highlight_color="#80ccff", point_highlight_size=8)



chart.show_data(line=line, data=[0,-100,10,90,-10,76,20,-54,100])



tk.mainloop()
24 changes: 24 additions & 0 deletions examples/ex14.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import ctkchart
import customtkinter as ctk


tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=tuple([x for x in range(2018,2026,1)]),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C")
,x_axis_data="123\n246\n8",y_axis_data="2\n123123\n234\n32423n",x_axis_data_position="top", y_axis_data_position="top"
)

chart.pack()

line = ctkchart.CTkLine(master=chart, size=3, style="normal" , fill="enabled", fill_color="#bdc6ed")



chart.show_data(line=line, data=[0,-100,10,90,-10,76,20,-54,100])



tk.mainloop()
22 changes: 22 additions & 0 deletions examples/ex2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import ctkchart
import customtkinter as ctk




tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=(2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C"),
y_axis_data="Y data" , y_axis_data_font_color=("#00ff00", "#00ff00"), x_axis_data_font_color=("#ff0000", "#ff0000"),
x_axis_data="X data",
data_font_style=("arial", 15, "underline"))
chart.pack()

line = ctkchart.CTkLine(master=chart)

chart.show_data(line=line, data=[0,-100,10,90,-10,76,20,-54,100])

tk.mainloop()
24 changes: 24 additions & 0 deletions examples/ex3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import ctkchart
import customtkinter as ctk




tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=tuple([x for x in range(2001,2016,1)]),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C"),
#y_axis_data="Y data" , y_axis_data_font_color=("#00ff00", "#00ff00"), x_axis_data_font_color=("#ff0000", "#ff0000"),
#x_axis_data="X data",
#data_font_style=("arial", 15, "underline")
x_axis_label_count=10, y_axis_label_count=4, y_axis_section_count=4,
)
chart.pack()

line = ctkchart.CTkLine(master=chart)

chart.show_data(line=line, data=[0,-100,10,90,-10,76,20,-54,100])

tk.mainloop()
24 changes: 24 additions & 0 deletions examples/ex4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import ctkchart
import customtkinter as ctk




tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=tuple([x for x in range(2018,2026,1)]),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C"),
#y_axis_data="Y data" , y_axis_data_font_color=("#00ff00", "#00ff00"), x_axis_data_font_color=("#ff0000", "#ff0000"),
#x_axis_data="X data",
#data_font_style=("arial", 15, "underline")
x_axis_display_values_indices=(1, 4 ,7)
)
chart.pack()

line = ctkchart.CTkLine(master=chart)

chart.show_data(line=line, data=[0,-100,10,90,-10,76,20,-54,100])

tk.mainloop()
26 changes: 26 additions & 0 deletions examples/ex5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import ctkchart
import customtkinter as ctk




tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=tuple([x for x in range(2018,2026,1)]),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C"),
#y_axis_data="Y data" , y_axis_data_font_color=("#00ff00", "#00ff00"), x_axis_data_font_color=("#ff0000", "#ff0000"),
#x_axis_data="X data",
#data_font_style=("arial", 15, "underline")
x_axis_data_position="side",
y_axis_data_position="top",

)
chart.pack()

line = ctkchart.CTkLine(master=chart)

chart.show_data(line=line, data=[0,-100,10,90,-10,76,20,-54,100])

tk.mainloop()
26 changes: 26 additions & 0 deletions examples/ex6.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import ctkchart
import customtkinter as ctk




tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=tuple([x for x in range(2018,2026,1)]),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C"),
#y_axis_data="Y data" , y_axis_data_font_color=("#00ff00", "#00ff00"), x_axis_data_font_color=("#ff0000", "#ff0000"),
#x_axis_data="X data",
#data_font_style=("arial", 15, "underline")
x_axis_font_color=("#ff0000", "#ff0000"),
y_axis_font_color=("#00ff00","#00ff00"),
axis_font_style=("arial",13,"bold")
)
chart.pack()

line = ctkchart.CTkLine(master=chart)

chart.show_data(line=line, data=[0,-100,10,90,-10,76,20,-54,100])

tk.mainloop()
26 changes: 26 additions & 0 deletions examples/ex7.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import ctkchart
import customtkinter as ctk




tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=tuple([x for x in range(2018,2026,1)]),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C"),
#y_axis_data="Y data" , y_axis_data_font_color=("#00ff00", "#00ff00"), x_axis_data_font_color=("#ff0000", "#ff0000"),
#x_axis_data="X data",
#data_font_style=("arial", 15, "underline")
y_axis_label_count=12,
y_axis_precision=4,
)

chart.pack()

line = ctkchart.CTkLine(master=chart)

chart.show_data(line=line, data=[0,-100,10,90,-10,76,20,-54,100])

tk.mainloop()
29 changes: 29 additions & 0 deletions examples/ex8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import ctkchart
import customtkinter as ctk


tk = ctk.CTk()
tk.configure(bg="#ffffff")
tk.geometry("600+300")

chart = ctkchart.CTkLineChart(master=tk, x_axis_values=tuple([x for x in range(2018,2026,1)]),
y_axis_values=(-100, 100), bg_color=("#eeeeee", "#191919"),fg_color=("#eeeeee", "#191919") , axis_color=("#909090", "#2C2C2C"),
y_axis_section_color=("#aaaaaa","#2c2c2c"),
x_axis_section_color=("#aaaaaa","#2c2c2c"),


y_axis_label_count=5,
y_axis_section_count=5,
x_axis_section_count=8,

)

chart.pack()

line = ctkchart.CTkLine(master=chart)
import random

chart.show_data(line=line, data=[0,-100,10,90,-10,76,20,-54,100])


tk.mainloop()
Loading

0 comments on commit 0ef2da8

Please sign in to comment.