Charts ====== Matplotlib charts ----------------- Some charts are rendered server-side (matplotlib / seaborn) by ``richy.core.charts``. Each chart has its own class for clarity. Charts are exported as SVG by default. BaseChart ~~~~~~~~~ Common base for all matplotlib chart classes. Provides the style helper ``material()``, the ticker formatter ``timestamp_to_date()``, and the SVG export. .. autoclass:: richy.core.charts.BaseChart :show-inheritance: .. automethod:: richy.core.charts.BaseChart.export Manager ~~~~~~~ Concrete renderer that produces matplotlib outputs. Currently exposes a per-item ``performance()`` chart (horizontal bar showing percentage change over 5d / 1m / 3m / 6m / YTD / 1y) and an internal ``linear_regression()`` helper. .. autoclass:: richy.core.charts.Manager :show-inheritance: .. automethod:: richy.core.charts.Manager.performance Highcharts charts ----------------- Interactive Highcharts (JavaScript) charts. Each class builds a Highcharts options / series dict that the template hands off to the ``highcharts`` Vue component. The classes are grouped below by where they appear in the UI. Transaction charts ~~~~~~~~~~~~~~~~~~ Charts used across the *Transactions* views (overview, basic stats, per-transaction detail). .. autoclass:: richy.core.charts.TransactionOverviewChart :show-inheritance: ``TransactionsBasicChart`` is the shared base for the next two column / pie chart variants and provides the ``get_investments`` / ``get_revenues`` / ``get_market_values`` data-shaping helpers used by both. .. autoclass:: richy.core.charts.TransactionsBasicChart :show-inheritance: .. autoclass:: richy.core.charts.TransactionsBasicColumnChart :show-inheritance: .. autoclass:: richy.core.charts.TransactionBasicPieChart :show-inheritance: .. autoclass:: richy.core.charts.TransactionDetailColumnChart :show-inheritance: Dashboard and coin overview ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Top-of-funnel summary charts -- the dashboard's net-worth pie and the coin-list staking ratio pie. .. autoclass:: richy.core.charts.DashboardMarketValueRatioPieChart :show-inheritance: .. autoclass:: richy.core.charts.OpenStakingsRatioPieChart :show-inheritance: Item-detail charts ~~~~~~~~~~~~~~~~~~ Per-item visualizations used on the item-detail page (and reused across shares / ETFs / indexes / coins): annual performance candles, drawdown timeline, and historical ATH periods. .. autoclass:: richy.core.charts.PerformanceChart :show-inheritance: .. autoclass:: richy.core.charts.DrawdownChart :show-inheritance: .. autoclass:: richy.core.charts.AthPeriodsChart :show-inheritance: Share-specific charts ~~~~~~~~~~~~~~~~~~~~~ Highcharts builders used exclusively by the share *Financials* view. Each class reads from one or more :class:`~richy.core.models.Asset` records (populated by :doc:`/modules/core/scraper`) and returns a Highcharts options dict ready for the template's Vue component. .. autoclass:: richy.core.charts.ShareRevenueEarningsEpsChart :show-inheritance: .. automethod:: richy.core.charts.ShareRevenueEarningsEpsChart.get_data .. automethod:: richy.core.charts.ShareRevenueEarningsEpsChart.get_options .. autoclass:: richy.core.charts.ShareEpsChart :show-inheritance: .. automethod:: richy.core.charts.ShareEpsChart.get_options .. autoclass:: richy.core.charts.ShareAnalystRatingsChart :show-inheritance: .. automethod:: richy.core.charts.ShareAnalystRatingsChart.get_options .. autoclass:: richy.core.charts.SharePriceRatingsChart :show-inheritance: .. automethod:: richy.core.charts.SharePriceRatingsChart.get_options