Giter Site home page Giter Site logo

akivymd's Issues

Disable - Swipe - akivymd-SwipeMenu

Disable swipe in swipemenu

on_touch_move the disable swipe is checked:

def on_touch_move(self, touch):
        pos = touch.pos
        if not self._root.allow_swipe:
            return False
        [......]

but during on_touch_up event its not checked, this cause the user to click else where and the swipemenu is dismissed,
is this a bug or intended?

Versions

  • OS: Windows 10
  • Python: 3.8
  • Kivy: v2.1.0.dev0
  • KivyMD: master

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

AkBarChart shows incorrect data on RecycleView

Description of the Bug

I want to create multiple AKBarCharts. But when I put them on a RecycleView, the data displayed in each graph is incorrect.

Code and Logs

from kivy.lang import Builder
from kivymd.app import MDApp
from kivy.factory import Factory as F
from kivy.uix.recycleview.views import RecycleDataViewBehavior

Builder.load_string("""
<Barchart@AKBarChart>
    size_hint_y: None
    height: dp(200)
    x_values: root.x_values
    y_values: root.y_values
    label_size: sp(12)
    bg_color: 202/255,202/255,202/255,1
    bars_color: 128/255,0,0,1
    labels_color: 0,0,0,1

<ScreenOne>:
    RecycleView:
        viewclass: 'Barchart'
        data: root.data
        RecycleBoxLayout:
            size_hint: (1, None)
            height: self.minimum_height
            padding: dp(10)
            spacing: dp(20)
            orientation: 'vertical'
            default_size_hint: 1, None
            default_size: None, dp(200)
""")

data = [
    {
        'x_values': [i, i + 1, i + 2, i + 3],
        'y_values': [10*i, 20*i, 30*i, 40*i],
        'id': i,
    } for i in range(9)
] 

class ScreenOne(F.Screen):
    data = data

class Barchart(RecycleDataViewBehavior, F.BoxLayout):
    x_values = F.ListProperty([1, 2, 3, 4, 5])
    y_values = F.ListProperty([1, 2, 3, 4, 5])
    id = F.NumericProperty()

class MyApp(MDApp):
    def build(self):
        return ScreenOne()

MyApp().run()

When you run the app, the first three or four items will be displaying the correct data.
Once you scroll down/up, every item will be shuffled and then everything will be incorrect.

Video

akivymd_bug-2022-05-03_21.55.12.mp4

Versions

  • OS: Arch Linux
  • Python: v3.10.4
  • Kivy: v2.0.0
  • KivyMD: master

AKBarChart is not showing all the y values correctly

Description of the Bug

Your text

Code and Logs

from kivy.app import App
from kivy.lang import Builder

kv = """
Screen:
    # KV-Code
"""


class MainApp(App):
    def build(self):
        self.root = Builder.load_string(kv)


if __name__ == '__main__':
    MainApp().run()

Screenshots

Add images to explain us this bug. Paste urls here.

Remove this section if no images here

Versions

  • OS:
  • Python:
  • Kivy:
  • KivyMD:

Turn the ScrollView in AKToolbarLayout to RecycleView

Description of the Feature

if ScrollView can be turned to a RecycleView, this will allow a faster dynamic widget update. Adding a widget dynamically in ScrollView wastes a lot of time and sometimes freezes the app. Using RecycleView will be more realstic

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.