Metadata-Version: 2.4
Name: chartexa
Version: 1.0.1
Summary: High-performance charting engine for Python — render publication-quality charts via .NET interop
Author-email: Kedevo <dev@kedevo.com>
License: MIT
Project-URL: Homepage, https://github.com/KEDevO/Chartexa
Project-URL: Repository, https://github.com/KEDevO/Chartexa
Project-URL: Issues, https://github.com/KEDevO/Chartexa/issues
Project-URL: Changelog, https://github.com/KEDevO/Chartexa/blob/main/CHANGELOG.md
Keywords: charting,charts,plotting,visualization,data-visualization,graphs
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pythonnet>=3.0.3
Requires-Dist: clr-loader>=0.2.6
Dynamic: license-file

# Chartexa — High-Performance Charting for Python

[![PyPI](https://img.shields.io/pypi/v/chartexa?label=PyPI&color=blue)](https://pypi.org/project/chartexa)
[![Python](https://img.shields.io/pypi/pyversions/chartexa)](https://pypi.org/project/chartexa)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/KEDevO/Chartexa/blob/main/LICENSE)

> Render publication-quality charts in Python using the Chartexa .NET engine — 40+ series types, real-time streaming, Jupyter integration, and GPU-accelerated rendering.

---

## Installation

```bash
pip install chartexa
```

### Prerequisites

- **Python 3.9+**
- [**.NET 10 Runtime**](https://dotnet.microsoft.com/download) installed on your system

### Production-Ready Capabilities

1. 40+ series types (2D, 3D, financial, scientific, instrumentation)
2. High-volume rendering with downsampling and batched updates
3. Native NumPy/Pandas interoperability
4. Real-time streaming and dashboard layout primitives
5. Notebook-first experience across Jupyter/VS Code/Colab

---

## Quick Start

### One-liner

```python
import chartexa as cx

cx.line([10, 20, 15, 30, 25]).save("chart.png")
```

### Fluent API

```python
import chartexa as cx

(cx.Chart(800, 600)
    .line([1, 2, 3, 4], [10, 20, 15, 30], stroke="#4FC3F7", label="Revenue")
    .scatter([1, 2, 3, 4], [12, 18, 17, 28], fill="red", label="Targets")
    .save("multi_series.png"))
```

### Financial Chart

```python
import chartexa as cx
import pandas as pd

df = pd.read_csv("stock_data.csv")
cx.candlestick(df).save("candlestick.png")
```

### Multi-Panel Dashboard

```python
import chartexa as cx

fig, axes = cx.subplots(2, 2)
axes[0, 0].line([1, 2, 3], [10, 20, 15])
axes[0, 1].scatter([1, 2, 3], [30, 10, 25])
axes[1, 0].bar(["A", "B", "C"], [40, 60, 30])
axes[1, 1].mountain([1, 2, 3], [5, 15, 10])
fig.save("dashboard.png")
```

### Real-Time Streaming

```python
import chartexa as cx

chart = cx.Chart()
with chart.begin_update():
    chart.line(sensor_x, sensor_y, label="Temperature")
    chart.line(sensor_x, humidity_y, label="Humidity")
chart.save("sensors.png")
```

---

## Features

### 40+ Series Types

| Category | Series |
|----------|--------|
| **Basic** | Line, Scatter, Column, Bar, Mountain, Band, Bubble |
| **Financial** | Candlestick, OHLC |
| **Statistical** | BoxPlot, ErrorBar, Fan, Heatmap, Pie, Donut |
| **Stacked** | StackedBar, StackedColumn, StackedMountain |
| **Polar** | Polar, Radar |
| **Scientific** | Oscilloscope, SpectrumAnalyzer, Waterfall, Lissajous, BodePlot, NyquistPlot |
| **Instruments** | Gauges (Angular, Radial, Linear), Thermometer, Compass, VuMeter |
| **Digital** | DigitalLine, DigitalBand, LogicAnalyzer, EyeDiagram, ConstellationDiagram |
| **Geospatial** | GpsTrack, SkyView, RadarSweep |
| **Widgets** | Alarm, Battery, PowerMeter, StatusLamp |
| **3D** | XYZSurface |

### Interactive Modifiers

Zoom/pan, tooltips, crosshair, cursor, rubber-band zoom, data point selection, and series selection.

### Theming & Styling

Built-in themes, custom colors (hex, RGB, CSS names), dash patterns, markers, and gradient palettes.

### Axes

Numeric, DateTime, Logarithmic, and Category axes with full customization.

### Data Sources & Streaming

Connect to MQTT, WebSocket, REST, gRPC, Serial (Arduino/ESP32), GPS, Audio, System Metrics, Docker, Market Data, OBD-II, CAN Bus, SDR, Flight Sims, Racing Sims, and more.

### Data Transforms

Built-in `moving_average`, `exponential_smoothing`, `derivative`, `integral`, `low_pass_filter`, `high_pass_filter`, `bollinger_bands`, and more.

### Performance & Large Data

- **LTTB downsampling** — visually lossless reduction for million-point datasets
- **Min/Max downsampling** — preserves extrema for financial/sensor data
- **FIFO ring buffer** — fixed-capacity streaming with automatic eviction
- **Batch updates** — `chart.begin_update()` suspends rendering for bulk operations
- **NumPy/Pandas integration** — pass arrays directly, zero-copy where possible

### Layout & Dashboards

- `subplots(rows, cols)` — matplotlib-style grid layouts
- `Figure` / `Dashboard` — named panels with row/col spans
- Constraint-based sizing (fixed + proportional)

### Jupyter & Notebook Integration

- Auto-detected in Jupyter, VS Code, Colab, Kaggle, and more
- `display_chart()` renders inline
- `ChartWidget` for interactive ipywidgets
- `%cx` / `%%cx` magic commands
- Colab GPU/CPU/TPU runtime detection

### Export Formats

- **PNG** — `chart.save("chart.png")` or `chart.to_bytes()`
- **HTML** — `chart.to_html()` / `chart.save_html("chart.html")`
- **Inline** — `chart.show()` (opens in browser or displays in notebook)

---

## How It Works

Chartexa for Python uses [pythonnet](https://github.com/pythonnet/pythonnet) to call into the Chartexa .NET charting engine. The Python package bundles the compiled .NET assemblies and provides a Pythonic API with fluent method chaining, NumPy/Pandas interop, and Jupyter integration.

```
Python API → pythonnet bridge → Chartexa .NET Engine → SkiaSharp renderer → PNG/HTML
```

---

## Links

- [GitHub Repository](https://github.com/KEDevO/Chartexa)
- [NuGet Packages](https://www.nuget.org/profiles/Kedevo) (C# libraries)
- [Changelog](https://github.com/KEDevO/Chartexa/blob/main/CHANGELOG.md)
- [Publishing Guide](../docs/PUBLISHING.md)

## PyPI Publishing (Maintainers)

Use the full instructions in [../docs/PUBLISHING.md](../docs/PUBLISHING.md). Summary:

```bash
python -m build
twine check dist/*
twine upload dist/*
```

For test deployments:

```bash
twine upload --repository testpypi dist/*
```

## License

MIT — see [LICENSE](https://github.com/KEDevO/Chartexa/blob/main/LICENSE) for details.
