Skip to content

Commit

Permalink
refactor: Remove polars dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
dangotbanned committed Oct 5, 2024
1 parent d1ea691 commit 436a65d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doc/_static/vega-altair_theme_test.html

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions tests/altair_theme_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
from pathlib import Path

import jinja2
import polars as pl

import altair as alt
from vega_datasets import data

common_data = pl.DataFrame(
common_data = alt.InlineData(
[
{"Index": 1, "Value": 28, "Position": 1, "Category": "A"},
{"Index": 2, "Value": 55, "Position": 2, "Category": "A"},
Expand Down Expand Up @@ -43,10 +42,10 @@
alt.Chart(common_data, width=240, height=150, title="Line")
.mark_line()
.encode(
x=alt.X("Position").axis(grid=False),
x=alt.X("Position:O").axis(grid=False),
y=alt.Y("Value:Q").axis(grid=False),
color=alt.Color("Category").legend(None),
tooltip=["Index", "Value", "Position", "Category"],
color=alt.Color("Category:N").legend(None),
tooltip=["Index:O", "Value:Q", "Position:O", "Category:N"],
)
)

Expand All @@ -56,9 +55,9 @@
.encode(
x=alt.X("Position:O").axis(grid=False),
y=alt.Y("Value:Q").axis(grid=False),
shape=alt.Shape("Category").legend(None),
color=alt.Color("Category").legend(None),
tooltip=["Index", "Value", "Position", "Category"],
shape=alt.Shape("Category:N").legend(None),
color=alt.Color("Category:N").legend(None),
tooltip=["Index:O", "Value:Q", "Position:O", "Category:N"],
)
)

Expand Down

0 comments on commit 436a65d

Please sign in to comment.