Skip to content

How to add border to bars and arcs #2989

Answered by jonmmease
mcp292 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you can use the stroke and strokeWidth arguments to mark_arc:

import pandas as pd
import altair as alt

source = pd.DataFrame({"category": [1, 2, 3, 4, 5, 6], "value": [4, 6, 10, 3, 7, 8]})

alt.Chart(source).mark_arc(stroke="black", strokeWidth=3).encode(
    theta=alt.Theta(field="value", type="quantitative"),
    color=alt.Color(field="category", type="nominal"),
)

Hope that helps!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mcp292
Comment options

Answer selected by mcp292
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants