{ "cells": [ { "cell_type": "markdown", "id": "d68a1604-1d1c-4a04-95eb-ca0e0f9d4da1", "metadata": {}, "source": [ "# Waterfall Plot\n", "\n", "A waterfall plot shows the cumulative effect of sequentially introduced positive or negative values.\n", "\n", "To use it, you need to import the 'bistro' module." ] }, { "cell_type": "code", "execution_count": 1, "id": "7b926beb-92f0-405e-8425-cef02e49285e", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "from lets_plot import *\n", "from lets_plot.bistro import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "67f97700-ee2e-4a27-8eee-296b4307c79e", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "0a5272f5-a594-4ce6-84e5-941528ac115d", "metadata": {}, "outputs": [], "source": [ "data = {\n", " \"Accounts\": [\"Product revenue\", \"Services revenue\", \"Fixed costs\", \"Variable costs\"],\n", " \"Values\": [830_000, 290_000, -360_000, -150_000],\n", "}" ] }, { "cell_type": "markdown", "id": "1858f51f-2da3-4f37-be27-f659db1e9752", "metadata": {}, "source": [ "## Default View" ] }, { "cell_type": "code", "execution_count": 4, "id": "ec40036a-b909-4f7f-8324-231dc2197885", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "