Skip to content
Merged

Test #28

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "funcnodes-plotly"
version = "0.3.1"
version = "0.3.2"
description = ""
readme = "README.md"
classifiers = [
Expand Down Expand Up @@ -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"
Expand Down
16 changes: 11 additions & 5 deletions src/funcnodes_plotly/express.py
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ def line_ternary(
[
"x",
],
lambda x: [NoValue] + list(iter(x)),
lambda x: ["index"] + list(iter(x)),
)
}
},
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_all_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ async def test_express_dictionary_data(self):
out = node.get_output("figure").value
self.assertIsInstance(out, go.Figure)
self.assertEqual(
node.inputs["x"].value_options["options"], [NoValue, "A", "B", "C", "D"]
node.inputs["x"].value_options["options"], ["index", "A", "B", "C", "D"]
)
plot(out, node.node_id)

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.