Skip to main content

reactpy-apexcharts

Minimal ReactPy wrapper for the react-apexcharts library (v 1.4.1).

Usage

pip install reactpy-apexcharts

Documentation

Configuration options can be found here

Simple Barchart Example

./examples/barchart_example.py

from reactpy import component, html, run
from reactpy_apexcharts import ApexChart

@component
def AppMain():

    return html.div(

        ApexChart(
            options = {
                'chart': {'id': 'apex-chart-example'},
                'xaxis': {
                'categories': [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999]}
            },

            series = [{
                'name': 'series-1',
                'data': [30, 40, 35, 50, 49, 60, 70, 91, 125]
            }],

            chart_type = "bar",
            width=500,
            height=320
        )
    )

# python -m examples.chart_example

if __name__ == "__main__":
    run(AppMain)

More complex area chart

syncing_chart.py, is a more complex example showing how to control color, grids and format X & Y axis labels.

./examples/syncing_chart.py

from reactpy import component, html, run
from reactpy_apexcharts import ApexChart

DATE = dt(2017, 2, 11)

options = {
    "series": [{"data": time_series(DATE, 20, {"min": 10, "max": 60})}],
    "chart": {"id": "fb", "group": "social", "type": "line", "height": 160},
    "xaxis": {'type': 'datetime'},
    "colors": ["#008FFB"],
}

optionsLine2 = {
    "series": [{"data": time_series(DATE, 20, {"min": 10, "max": 30})}],
    "chart": {"id": "tw", "group": "social", "type": "line", "height": 160},
    "xaxis": {'type': 'datetime'},
    "colors": ["#546E7A"],
}

optionsArea = {
    "series": [{"data": time_series(DATE, 20, {"min": 10, "max": 60})}],
    "chart": {"id": "yt","group": "social","type": "area","height": 160},
    "xaxis": {'type': 'datetime'},
    "colors": ["#00E396"]
}


@component
def CustomChart(options):
    return  html.div({'style': {'min-height': '175px'}},
        ApexChart(options=options),
    )

@component
def AppMain():
    return html.div(
        CustomChart(options=options),
        CustomChart(options=optionsLine2),
        CustomChart(options=optionsArea),
    )


# python -m examples.syncing_chart

if __name__ == "__main__":
    run(AppMain)

Metadata

Release files for reactpy-apexcharts 0.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reactpy-apexcharts 0.0.12
File Size Uploaded
reactpy_apexcharts-0.0.12.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for reactpy-apexcharts 0.0.12
File Interpreter ABI Platform
reactpy_apexcharts-0.0.12-py3-none-any.whl Python 3 none any Details

Total release size: 3.1 MB

Release files / reactpy_apexcharts-0.0.12.tar.gz

Download URL reactpy_apexcharts-0.0.12.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
2a34c88a39415a1b92bba2c59753bb294355fdb9891122cd01d829516a562d66
BLAKE2b-256 checksum
How to use checksums
6e66f2778206e9f31c179afa30bc3ba1cec679a2d389d66bbcb49083b41623b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2

Release files / reactpy_apexcharts-0.0.12-py3-none-any.whl

Download URL reactpy_apexcharts-0.0.12-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
baec728051a79c7358b231e7a59bdaa4328f634d9ab5460fce6e4cb82e990431
BLAKE2b-256 checksum
How to use checksums
fdc5b892083cd65468d81d5df7fd27b8c51131a6c2d34cc38cb8bc3226a33f71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

0.0.12 This release

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page