diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0da92f2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,21 @@ +## v0.3.2 (2025-06-06) + +### Feat + +- update package dependencies and refactor render plugin types for improved compatibility +- add CSS styles for funcnodes_plotly_container and update module path in React plugin +- enhance add_trace function to support optional figure input and handle trace as figure + +### Fix + +- **data**: 🐛 handle index as x value in plot_multidata function +- update kaleido dependency condition for non-Windows platforms +- handle potential purge errors +- handle NoValue in plotting functions to ensure proper data representation + +### Refactor + +- rename test classes and update output variable names for clarity +- update plotting functions to return both trace and figure + +## v0.2.0 (2024-08-29) diff --git a/pyproject.toml b/pyproject.toml index bcfec21..65913e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "funcnodes-plotly" -version = "0.3.1" +version = "0.3.2" description = "" readme = "README.md" classifiers = [ @@ -47,6 +47,13 @@ download = "https://pypi.org/project/funcnodes-plotly/#files" [tool.setuptools.package-dir] "" = "src" + +[tool.commitizen] +name = "cz_conventional_commits" +tag_format = "v$version" +version_scheme = "pep440" +version_provider = "uv" +update_changelog_on_bump = true [project.entry-points."funcnodes.module"] module = "funcnodes_plotly" shelf = "funcnodes_plotly:NODE_SHELF" diff --git a/src/funcnodes_plotly/express.py b/src/funcnodes_plotly/express.py index 8f2f51c..a80b715 100644 --- a/src/funcnodes_plotly/express.py +++ b/src/funcnodes_plotly/express.py @@ -1452,7 +1452,7 @@ def line_ternary( [ "x", ], - lambda x: [NoValue] + list(iter(x)), + lambda x: ["index"] + list(iter(x)), ) } }, @@ -1486,11 +1486,17 @@ def is_plotable(value): and value.ndim < 2 ) - if x not in data: - raise ValueError(f"The specified x '{x}' is not in the dictionary.") + if not isinstance(data, pd.DataFrame): + data = pd.DataFrame(data) + + if x == "index": + x_values = data.index + else: + if x not in data: + raise ValueError(f"The specified x '{x}' is not in the data.") - # Extract the x values - x_values = data[x] + # Extract the x values + x_values = data[x] # Create figure fig = go.Figure() diff --git a/uv.lock b/uv.lock index abd0953..574baad 100644 --- a/uv.lock +++ b/uv.lock @@ -489,7 +489,7 @@ wheels = [ [[package]] name = "funcnodes-plotly" -version = "0.3.1" +version = "0.3.2" source = { editable = "." } dependencies = [ { name = "funcnodes" },