ctkchart


Namectkchart JSON
Version 2.1.4 PyPI version JSON
download
home_pageNone
Summaryctkchart is a Python library for creating live updating line charts in customtkinter.
upload_time2024-07-04 18:53:25
maintainerNone
docs_urlNone
authorThisal-D
requires_python>=3.0
licenseCopyright (c) 2024 The Python Packaging Authority Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

[![ctkchart](https://snyk.io/advisor/python/ctkchart/badge.svg)](https://snyk.io/advisor/python/ctkchart)

# ctkchart

[![Downloads](https://static.pepy.tech/badge/ctkchart)](https://pepy.tech/project/ctkchart) [![Downloads](https://static.pepy.tech/badge/ctkchart/month)](https://pepy.tech/project/ctkchart) [![Downloads](https://static.pepy.tech/badge/ctkchart/week)](https://pepy.tech/project/ctkchart)

<img src="https://drive.google.com/thumbnail?id=1YgJhoMequmeKlWmcNo8sgz2RhffPkRVk&sz=w180">


</div>

**<li>ctkchart is a  python library for creating live updating line charts in customtkinter.</li>**

---

### Features

- **Live Update**: Display live data with line charts.
- **Multiple Lines**: Support for plotting multiple lines on the same chart for easy comparison.
- **Color Customization**: Customize colors to match your application's design or data representation.
- **Dynamic Color Change**: Dynamic Color Change for Dark & Light.
- **Font Customization**: Adjust fonts for text elements to enhance readability.
- **Dimension Customization**: Customize chart dimensions to fit various display sizes and layouts.

---

### Importing & Installation
* **Installation**
    ```
    pip install ctkchart
    ```

* **Importing**
    ``` python
    import ctkchart
    ```

---

### Simple Guide
- **import package**
    ``` python
    import ctkchart
    ```

- **Create Line Chart and place the chart**
    ``` python
    chart = ctkchart.CTkLineChart(
        master=root,
        x_axis_values=("a", "b", "c", "d", "e", "f"),
        y_axis_values=(100, 900)
    )
    chart.place(x=10, y=10)
    ```

- **Create Line**
    ``` python
    line = ctkchart.CTkLine(master=chart)
    ```

- **Display Data**
    display data using a loop
    ``` python
    def loop():
        while True:
            random_data = random.choice(range(100, 900))
            chart.show_data(line=line, data=[random_data])
            time.sleep(1)
    
    #call the loop as thead
    theading.Thread(target=loop).start()
    ```

---

### Full Code Example
``` python
import ctkchart #  <- import the package
import tkinter
import random
import threading
import time

#create window
root = tkinter.Tk()

#create chart
chart = ctkchart.CTkLineChart(
    master=root,
    x_axis_values=("a", "b", "c", "d", "e", "f"),
    y_axis_values=(100, 900)
)
chart.place(x=10, y=10) #place chrt

#create line
line = ctkchart.CTkLine(master=chart)

def loop():
    while True:
        random_data = random.choice(range(100, 900)) #get random data
        chart.show_data(line=line, data=[random_data]) # <- display data using chart 
        time.sleep(1) #wait 1 sec
        
#call the loop as thead
threading.Thread(target=loop).start()

root.mainloop()
```

---

### Links

- [**Documentation**](https://github.com/Thisal-D/ctkchart/blob/main/documentation/)
    - [English](https://github.com/Thisal-D/ctkchart/blob/main/documentation/DOCUMENTATION_EN.md)
    - [chinese](https://github.com/Thisal-D/ctkchart/blob/main/documentation/DOCUMENTATION_CN.md)
- **GitHub Repository :** [ctkchart](https://github.com/Thisal-D/ctkchart)

---

### Contributors
- [<img src="https://github.com/childeyouyu.png?size=25" width="25">](https://github.com/childeyouyu) [youyu](https://github.com/childeyouyu)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ctkchart",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.0",
    "maintainer_email": null,
    "keywords": null,
    "author": "Thisal-D",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/a3/60/30814ec416e32fe378398cf1f0271ed59d3c3ebba51d4ab7e4ebf28304cd/ctkchart-2.1.4.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\r\n\r\n[![ctkchart](https://snyk.io/advisor/python/ctkchart/badge.svg)](https://snyk.io/advisor/python/ctkchart)\r\n\r\n# ctkchart\r\n\r\n[![Downloads](https://static.pepy.tech/badge/ctkchart)](https://pepy.tech/project/ctkchart) [![Downloads](https://static.pepy.tech/badge/ctkchart/month)](https://pepy.tech/project/ctkchart) [![Downloads](https://static.pepy.tech/badge/ctkchart/week)](https://pepy.tech/project/ctkchart)\r\n\r\n<img src=\"https://drive.google.com/thumbnail?id=1YgJhoMequmeKlWmcNo8sgz2RhffPkRVk&sz=w180\">\r\n\r\n\r\n</div>\r\n\r\n**<li>ctkchart is a  python library for creating live updating line charts in customtkinter.</li>**\r\n\r\n---\r\n\r\n### Features\r\n\r\n- **Live Update**: Display live data with line charts.\r\n- **Multiple Lines**: Support for plotting multiple lines on the same chart for easy comparison.\r\n- **Color Customization**: Customize colors to match your application's design or data representation.\r\n- **Dynamic Color Change**: Dynamic Color Change for Dark & Light.\r\n- **Font Customization**: Adjust fonts for text elements to enhance readability.\r\n- **Dimension Customization**: Customize chart dimensions to fit various display sizes and layouts.\r\n\r\n---\r\n\r\n### Importing & Installation\r\n* **Installation**\r\n    ```\r\n    pip install ctkchart\r\n    ```\r\n\r\n* **Importing**\r\n    ``` python\r\n    import ctkchart\r\n    ```\r\n\r\n---\r\n\r\n### Simple Guide\r\n- **import package**\r\n    ``` python\r\n    import ctkchart\r\n    ```\r\n\r\n- **Create Line Chart and place the chart**\r\n    ``` python\r\n    chart = ctkchart.CTkLineChart(\r\n        master=root,\r\n        x_axis_values=(\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"),\r\n        y_axis_values=(100, 900)\r\n    )\r\n    chart.place(x=10, y=10)\r\n    ```\r\n\r\n- **Create Line**\r\n    ``` python\r\n    line = ctkchart.CTkLine(master=chart)\r\n    ```\r\n\r\n- **Display Data**\r\n    display data using a loop\r\n    ``` python\r\n    def loop():\r\n        while True:\r\n            random_data = random.choice(range(100, 900))\r\n            chart.show_data(line=line, data=[random_data])\r\n            time.sleep(1)\r\n    \r\n    #call the loop as thead\r\n    theading.Thread(target=loop).start()\r\n    ```\r\n\r\n---\r\n\r\n### Full Code Example\r\n``` python\r\nimport ctkchart #  <- import the package\r\nimport tkinter\r\nimport random\r\nimport threading\r\nimport time\r\n\r\n#create window\r\nroot = tkinter.Tk()\r\n\r\n#create chart\r\nchart = ctkchart.CTkLineChart(\r\n    master=root,\r\n    x_axis_values=(\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"),\r\n    y_axis_values=(100, 900)\r\n)\r\nchart.place(x=10, y=10) #place chrt\r\n\r\n#create line\r\nline = ctkchart.CTkLine(master=chart)\r\n\r\ndef loop():\r\n    while True:\r\n        random_data = random.choice(range(100, 900)) #get random data\r\n        chart.show_data(line=line, data=[random_data]) # <- display data using chart \r\n        time.sleep(1) #wait 1 sec\r\n        \r\n#call the loop as thead\r\nthreading.Thread(target=loop).start()\r\n\r\nroot.mainloop()\r\n```\r\n\r\n---\r\n\r\n### Links\r\n\r\n- [**Documentation**](https://github.com/Thisal-D/ctkchart/blob/main/documentation/)\r\n    - [English](https://github.com/Thisal-D/ctkchart/blob/main/documentation/DOCUMENTATION_EN.md)\r\n    - [chinese](https://github.com/Thisal-D/ctkchart/blob/main/documentation/DOCUMENTATION_CN.md)\r\n- **GitHub Repository :** [ctkchart](https://github.com/Thisal-D/ctkchart)\r\n\r\n---\r\n\r\n### Contributors\r\n- [<img src=\"https://github.com/childeyouyu.png?size=25\" width=\"25\">](https://github.com/childeyouyu) [youyu](https://github.com/childeyouyu)\r\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2024 The Python Packaging Authority  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "ctkchart is a Python library for creating live updating line charts in customtkinter.",
    "version": "2.1.4",
    "project_urls": {
        "homepage": "https://github.com/Thisal-D/ctkchart",
        "issues": "https://github.com/Thisal-D/ctkchart/issues",
        "repository": "https://github.com/Thisal-D/ctkchart"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df644e25600334d4649a23ceb0f83244b627af98064fd3d390c96974d043a0a7",
                "md5": "f252d84a10d0bda84fda337621fd88c6",
                "sha256": "bbebe4c5a9678e512a6428449350d90769caf785ae0502ff4e01dd492f597901"
            },
            "downloads": -1,
            "filename": "ctkchart-2.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f252d84a10d0bda84fda337621fd88c6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.0",
            "size": 25528,
            "upload_time": "2024-07-04T18:53:24",
            "upload_time_iso_8601": "2024-07-04T18:53:24.001814Z",
            "url": "https://files.pythonhosted.org/packages/df/64/4e25600334d4649a23ceb0f83244b627af98064fd3d390c96974d043a0a7/ctkchart-2.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a36030814ec416e32fe378398cf1f0271ed59d3c3ebba51d4ab7e4ebf28304cd",
                "md5": "72586ab076ee5608d1358756e431ba12",
                "sha256": "e00d34973aa2a79b7f5f4fc2de02ae35da5694441872121273690b07f5505ab7"
            },
            "downloads": -1,
            "filename": "ctkchart-2.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "72586ab076ee5608d1358756e431ba12",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.0",
            "size": 25906,
            "upload_time": "2024-07-04T18:53:25",
            "upload_time_iso_8601": "2024-07-04T18:53:25.322834Z",
            "url": "https://files.pythonhosted.org/packages/a3/60/30814ec416e32fe378398cf1f0271ed59d3c3ebba51d4ab7e4ebf28304cd/ctkchart-2.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-04 18:53:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Thisal-D",
    "github_project": "ctkchart",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "ctkchart"
}
        
Elapsed time: 0.27481s