{ "cells": [ { "cell_type": "markdown", "id": "8023e47d-62e8-4192-98d2-5728e53bd208", "metadata": {}, "source": [ "# Waterfall Chart" ] }, { "cell_type": "code", "execution_count": 1, "id": "fc5ec06c-8e83-4bed-9b92-a75e548c0045", "metadata": {}, "outputs": [], "source": [ "from lets_plot import *\n", "from lets_plot.bistro import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "d28d3d4d-e8cd-44e6-b52c-c46b985dc52c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "166ccf3a-a333-48dc-910a-e790ec869c65", "metadata": {}, "outputs": [], "source": [ "data1 = dict(\n", " x = [\"A\", \"B\", \"C\", \"D\", \"E\"],\n", " y = [300, -100, -400, 300, 200],\n", ")\n", "\n", "data2 = dict(\n", " x = [\"A\", \"B\", \"C\", \"D\", \"T1\", \"A\", \"B\", \"C\", \"D\", \"T2\"],\n", " y = [100, 100, -300, 500, None, -200, 300, 100, -300, 0.0],\n", " m = ['relative', 'relative', 'relative', 'relative', 'total', 'relative', 'relative', 'relative', 'relative', 'total'],\n", ")\n", "\n", "data3 = dict(\n", " x = [\"A\", \"B\", \"C\", \"D\", \"E\", \"A\", \"B\", \"C\", \"D\", \"T\"],\n", " y = [100, 100, -300, 500, 300, -200, 300, 100, -300, 0.0],\n", " m = ['absolute', 'relative', 'relative', 'relative', 'absolute', 'relative', 'relative', 'relative', 'relative', 'total'],\n", ")" ] }, { "cell_type": "markdown", "id": "8c8ff80a-7239-45de-95f2-aff92ec80663", "metadata": {}, "source": [ "## Default" ] }, { "cell_type": "code", "execution_count": 4, "id": "e7c6897f-528c-4c53-972d-0366e87d2343", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " " ], "text/plain": [ "