Skip to content

Asking for help - Line plot shows striked then solid line connecting each other - trying to show solid then striked line. #3313

Answered by mattijn
lolitanaz314 asked this question in Q&A
Discussion options

You must be logged in to vote

There are two different fields for your strokeDash channel, so you'll have to define a single scale with fixed domain / range values combination and apply this scale to both strokeDash channels.

import altair as alt
import pandas as pd

data = {'channel': ['ch_0']*11,
        'spend': [0.000000, 114.964310, 229.928619, 344.892944, 459.857239, 574.821533, 689.785889, 804.750122, 919.714478, 1034.678711, 1149.643066],
        'spend_multiplier': [0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0],
        'mean': [0.000000, 660.952271, 1109.004028, 1447.120483, 1715.819824, 1936.538818, 2122.165283, 2281.103516, 2419.135254, 2540.404297, 2647.977295],
       }

df = pd.DataFrame(data)

#…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@lolitanaz314
Comment options

@lolitanaz314
Comment options

@mattijn
Comment options

Answer selected by mattijn
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