{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", " \n", " \n", " \n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Billboard \n", "\n", "\n", "## Gauge Chart\n", "\n", "[here](https://c3js.org/)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "
\n", "\n", "\n", "\n", "" ], "text/plain": [ "" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from epyk.core.Page import Report\n", "\n", "rptObj = Report()\n", "dataPoints = [\n", " {'x': 0, 'y': 10, 'y1': 10},\n", " {'x': 1, 'y': 35, 'y1': 20},\n", " {'x': 2, 'y': 25, 'y1': 10},\n", " {'x': 3, 'y': 30, 'y1': 5},\n", " {'x': 4, 'y': 28, 'y1': 10}]\n", "\n", "dataPoints2 = [\n", " {'label': \"mango\", 'x': 0, 'y': 30, 'y1': 0},\n", " {'label': \"grape\", 'x': 1, 'y': 28, 'y1': 0}\n", "]\n", "\n", "c = rptObj.ui.charts.billboard.gauge(45)\n", "\n", "rptObj.ui.button(\"reset\").click([\n", " c.build(90) #dataPoints2),\n", "])\n", "\n", "c.click([\n", " rptObj.js.console.log(c.js.content)\n", "])\n", "\n", "dataPoints3 = [\n", " {'label': \"mango\", 'x': 0, 'y': 20, 'y1': 20, 'r': 10},\n", " {'label': \"grape\", 'x': 1, 'y': 18, 'y2': 20, 'r': 5}\n", "]\n", "\n", "rptObj.ui.button(\"reset\").click([\n", " c.build(10),\n", "])\n", "\n", "rptObj.outs.jupyter()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For more details about this charts and the various options and properties available please refer to the [official website](https://www.chartjs.org/samples/latest/)\n", "\n", "Anything on the website should be available in the Python interface.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Go back to the Chart Home page\n", "
\n", "Do not forget that this is a collaborative framework so do not hesitate to give feedbacks and like the different repository to get more visbility.\n", "\n", "Also any help is more than welcome !" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.2" } }, "nbformat": 4, "nbformat_minor": 4 }