From c3fb2f651d82a0d0866fbaf47a99eb96f39e49fd Mon Sep 17 00:00:00 2001 From: dvalleri Date: Thu, 12 Dec 2024 12:18:45 +0100 Subject: [PATCH] feat(sdk): fix linear chart in multiclass --- .../multi_classification/multi_class_chart.py | 2 +- sdk/tests/chart/multi_class.ipynb | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/sdk/radicalbit_platform_sdk/charts/multi_classification/multi_class_chart.py b/sdk/radicalbit_platform_sdk/charts/multi_classification/multi_class_chart.py index e92881c1..edc42e86 100644 --- a/sdk/radicalbit_platform_sdk/charts/multi_classification/multi_class_chart.py +++ b/sdk/radicalbit_platform_sdk/charts/multi_classification/multi_class_chart.py @@ -100,7 +100,7 @@ def linear_chart( 'symbol': 'none', 'data': element.values, 'endLabel': { - 'show': False, + 'show': True, 'color': '#9B99A1', }, } for element in data.reference_data] diff --git a/sdk/tests/chart/multi_class.ipynb b/sdk/tests/chart/multi_class.ipynb index aeb037bc..097b94b9 100644 --- a/sdk/tests/chart/multi_class.ipynb +++ b/sdk/tests/chart/multi_class.ipynb @@ -83,7 +83,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 1, "id": "4064888b-7b71-4581-92db-cb3d142e3213", "metadata": {}, "outputs": [ @@ -97,7 +97,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "016d88c0ae4849279a4fa36d45b96eb2", + "model_id": "acf0c08fac784c47a737e6d35c623573", "version_major": 2, "version_minor": 0 }, @@ -105,7 +105,7 @@ "EChartsRawWidget(option={'yAxis': {'type': 'value', 'axisLabel': {'fontSize': 9, 'color': '#9b99a1'}, 'splitLiā€¦" ] }, - "execution_count": 6, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -121,6 +121,12 @@ " [ \"2024-04-10 00:00:00\",\"1\" ],\n", " [ \"2024-04-11 00:00:00\",\"1\" ],\n", " [ \"2024-04-12 00:00:00\",\"1\" ]\n", + " ]),\n", + " MultiClassificationLinearData(name='1',values=[ \n", + " [ \"2024-04-09 00:00:00\",\"0.5\" ],\n", + " [ \"2024-04-10 00:00:00\",\"0.5\" ],\n", + " [ \"2024-04-11 00:00:00\",\"0.5\" ],\n", + " [ \"2024-04-12 00:00:00\",\"0.5\" ]\n", " ])\n", " ],\n", " current_data=[\n", @@ -129,6 +135,12 @@ " [ \"2024-04-10 00:00:00\",\"0.974\" ],\n", " [ \"2024-04-11 00:00:00\",\"0.95\" ],\n", " [ \"2024-04-12 00:00:00\",\"1\" ]\n", + " ]),\n", + " MultiClassificationLinearData(name='1',values=[ \n", + " [ \"2024-04-09 00:00:00\",\"0.875\" ],\n", + " [ \"2024-04-10 00:00:00\",\"0.914\" ],\n", + " [ \"2024-04-11 00:00:00\",\"0.7\" ],\n", + " [ \"2024-04-12 00:00:00\",\"0.1\" ]\n", " ])\n", " ] \n", "))"