{"id":34857525,"url":"https://github.com/deepentropy/lwcharts","last_synced_at":"2026-01-20T16:48:07.028Z","repository":{"id":328487164,"uuid":"1093778201","full_name":"deepentropy/lwcharts","owner":"deepentropy","description":"TradingView Lightweight Charts™ integration in Jupyter","archived":false,"fork":false,"pushed_at":"2025-11-12T11:07:58.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-15T04:13:09.292Z","etag":null,"topics":["jupyter-notebook","lightweight-charts"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepentropy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-10T20:35:52.000Z","updated_at":"2025-11-28T23:32:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/deepentropy/lwcharts","commit_stats":null,"previous_names":["deepentropy/lwcharts"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/deepentropy/lwcharts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepentropy%2Flwcharts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepentropy%2Flwcharts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepentropy%2Flwcharts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepentropy%2Flwcharts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepentropy","download_url":"https://codeload.github.com/deepentropy/lwcharts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepentropy%2Flwcharts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27785315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jupyter-notebook","lightweight-charts"],"created_at":"2025-12-25T20:14:40.289Z","updated_at":"2025-12-25T20:14:45.742Z","avatar_url":"https://github.com/deepentropy.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lwcharts - Lightweight Charts for Jupyter\n\nUltra-simple TradingView Lightweight Charts integration for Jupyter notebooks. No widget infrastructure, no build steps, just works.\n\n![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)\n![Python](https://img.shields.io/badge/python-3.7%2B-blue.svg)\n\n## Why lwcharts?\n\n**lwcharts** takes a radically simple approach to displaying charts in Jupyter:\n- ✅ **No JavaScript build required** - Uses inline HTML with CDN-loaded libraries\n- ✅ **No widget infrastructure** - Just pure IPython HTML display\n- ✅ **Works everywhere** - PyCharm, JupyterLab, VS Code, Colab, anywhere Jupyter runs\n- ✅ **Zero configuration** - Install and use immediately\n- ✅ **Tiny package** - Less than 2KB, only depends on IPython\n\n## Installation\n\n```bash\npip install lwcharts\n```\n\nThat's it! No additional setup, no extensions to install, no build steps.\n\n## Quick Start\n\n### Line Chart\n\n```python\nfrom lwcharts import Chart\n\nchart = Chart(chart_type='line', width=800, height=400)\nchart.data = [\n    {'time': '2025-01-01', 'value': 100},\n    {'time': '2025-01-02', 'value': 110},\n    {'time': '2025-01-03', 'value': 105},\n    {'time': '2025-01-04', 'value': 120},\n]\nchart  # Display the chart\n```\n\n### Candlestick Chart\n\n```python\nfrom lwcharts import Chart\n\nchart = Chart(chart_type='candlestick', width=800, height=400)\nchart.data = [\n    {'time': '2025-01-01', 'open': 100, 'high': 110, 'low': 95, 'close': 105},\n    {'time': '2025-01-02', 'open': 105, 'high': 115, 'low': 100, 'close': 112},\n    {'time': '2025-01-03', 'open': 112, 'high': 120, 'low': 108, 'close': 115},\n]\nchart\n```\n\n## Supported Chart Types\n\n### 1. Line Chart\n```python\nchart = Chart(chart_type='line')\nchart.data = [{'time': '2025-01-01', 'value': 100}, ...]\n```\n\n### 2. Area Chart\n```python\nchart = Chart(chart_type='area')\nchart.data = [{'time': '2025-01-01', 'value': 100}, ...]\n```\n\n### 3. Candlestick Chart\n```python\nchart = Chart(chart_type='candlestick')\nchart.data = [\n    {'time': '2025-01-01', 'open': 100, 'high': 110, 'low': 95, 'close': 105},\n    ...\n]\n```\n\n### 4. Bar Chart\n```python\nchart = Chart(chart_type='bar')\nchart.data = [\n    {'time': '2025-01-01', 'open': 100, 'high': 110, 'low': 95, 'close': 105},\n    ...\n]\n```\n\n### 5. Histogram Chart\n```python\nchart = Chart(chart_type='histogram')\nchart.data = [\n    {'time': '2025-01-01', 'value': 50000, 'color': '#26a69a'},\n    ...\n]\n```\n\n## Customization\n\n### Chart Dimensions\n\n```python\nchart = Chart(chart_type='line', width=1000, height=600)\n```\n\n### Chart Options\n\n```python\nchart = Chart(chart_type='candlestick')\n\n# Customize appearance\nchart.chart_options = {\n    'layout': {\n        'background': {'color': '#1e1e1e'},\n        'textColor': '#d1d4dc',\n    },\n    'grid': {\n        'vertLines': {'color': '#2a2a2a'},\n        'horzLines': {'color': '#2a2a2a'},\n    },\n}\n```\n\n### Series Options\n\n```python\n# Customize candlestick colors\nchart.series_options = {\n    'upColor': '#26a69a',\n    'downColor': '#ef5350',\n    'wickUpColor': '#26a69a',\n    'wickDownColor': '#ef5350',\n}\n```\n\n## Real-World Example: Stock Data\n\n```python\nimport pandas as pd\nimport yfinance as yf\nfrom lwcharts import Chart\n\n# Download stock data\nticker = yf.Ticker('AAPL')\ndf = ticker.history(period='1mo')\n\n# Convert to lwc format\ndata = [\n    {\n        'time': index.strftime('%Y-%m-%d'),\n        'open': row['Open'],\n        'high': row['High'],\n        'low': row['Low'],\n        'close': row['Close'],\n    }\n    for index, row in df.iterrows()\n]\n\n# Display chart\nchart = Chart(chart_type='candlestick', width=1000, height=600)\nchart.data = data\nchart\n```\n\n## Supported Environments\n\nWorks in **any** Jupyter environment:\n\n| Environment | Status |\n|------------|--------|\n| **PyCharm Professional** | ✅ Works |\n| **JupyterLab** | ✅ Works |\n| **Jupyter Notebook** | ✅ Works |\n| **VS Code** | ✅ Works |\n| **Google Colab** | ✅ Works |\n| **Kaggle Notebooks** | ✅ Works |\n| **Databricks** | ✅ Works |\n\n## API Reference\n\n### Chart Class\n\n```python\nChart(\n    chart_type='line',    # 'line', 'area', 'candlestick', 'bar', 'histogram'\n    width=800,            # Chart width in pixels\n    height=400            # Chart height in pixels\n)\n```\n\n#### Properties\n\n- `data` (list): Chart data points\n- `chart_type` (str): Type of chart\n- `width` (int): Chart width in pixels\n- `height` (int): Chart height in pixels\n- `chart_options` (dict): Chart configuration\n- `series_options` (dict): Series configuration\n\n#### Methods\n\n- `display()`: Explicitly display the chart\n- `set_data(data)`: Set chart data\n- `add_data_point(point)`: Add a single data point\n\n## How It Works\n\nUnlike traditional Jupyter widgets that require complex JavaScript builds and widget infrastructure, **lwcharts** uses a simple approach:\n\n1. Creates HTML with embedded JavaScript\n2. Loads lightweight-charts library from CDN (unpkg.com)\n3. Generates inline JavaScript to create and populate the chart\n4. Returns HTML via `_repr_html_()` for Jupyter display\n\nThis means:\n- ✅ No RequireJS/AMD module loading issues\n- ✅ No widget registration needed\n- ✅ No nbextension installation\n- ✅ Works immediately after `pip install`\n\n## Examples\n\nSee the [examples.ipynb](./examples.ipynb) notebook for more usage examples including all chart types and customization options.\n\n## Requirements\n\n- Python 3.7+\n- IPython (automatically installed with Jupyter)\n- Internet access (to load lightweight-charts from CDN)\n\n## Documentation\n\nFor chart options and customization, see the [TradingView Lightweight Charts documentation](https://tradingview.github.io/lightweight-charts/).\n\n## License\n\nApache License 2.0 - See [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\nBuilt on [TradingView Lightweight Charts](https://github.com/tradingview/lightweight-charts)\n\n## Support\n\n- Open an issue on [GitHub](https://github.com/yourusername/lwcharts/issues)\n- Check the [examples.ipynb](./examples.ipynb) notebook\n- Read the [TradingView docs](https://tradingview.github.io/lightweight-charts/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepentropy%2Flwcharts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepentropy%2Flwcharts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepentropy%2Flwcharts/lists"}