akivymd
akivymd copied to clipboard
Smallest value bar doesn't plot.
Description of the Bug
When I run the AKBarChart, the smallest value never plots.
Code and Logs
from kivymd.app import MDApp from kivy.lang.builder import Builder
from kivymd_extensions.akivymd.uix.charts import AKBarChart
KV = ''' #:import get_color_from_hex kivy.utils.get_color_from_hex MDScreen:
MDBoxLayout:
orientation: 'vertical'
ScrollView:
MDBoxLayout:
id: layout
orientation: 'vertical'
spacing: 20
padding: 10
adaptive_height: True
AKBarChart:
size_hint_y: None
height: "280dp"
id: chart
labels: True
anim: False
label_size: 15
bars_radius: 0
# Customize the colors
# bars colors
bars_color: get_color_from_hex("#4CD6D7")
# background color
bg_color: get_color_from_hex("#363E41")
# line color
lines_color: get_color_from_hex("#363E41")
x_values: [1, 2, 3, 4]
y_values: [3, 4, 6, 8]
'''
class BarChartApp(MDApp): def build(self): return Builder.load_string(KV)
def on_start(self):
chart = self.root.ids.chart
# adding x labels
chart.x_labels = ['C', 'C++', 'Java', 'Python']
if name == 'main': BarChartApp().run()
Screenshots
Add images to explain us this bug. Paste urls here.
Remove this section if no images here
Versions
- OS: Windows
- Python: 3.8
- Kivy: 2.1.0
- KivyMD: 1.2.0.dev0