Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smallest value bar doesn't plot. #29

Open
martin4951 opened this issue Mar 8, 2023 · 0 comments
Open

Smallest value bar doesn't plot. #29

martin4951 opened this issue Mar 8, 2023 · 0 comments

Comments

@martin4951
Copy link

martin4951 commented Mar 8, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant