Skip to content

可以实现类似vega-lite中mark为trail的大小不断变化的线条吗?如图 #5124

Closed Answered by pearmini
ChristmasFox asked this question in Q&A
Discussion options

You must be logged in to vote

这个 PR 支持这个功能:#5137

chart
  .line()
  .data({
    type: 'fetch',
    value:
      'https://gw.alipayobjects.com/os/bmw-prod/cb99c4ab-e0a3-4c76-9586-fe7fa2ff1a8c.csv',
  })
  .encode('x', (d) => new Date(d.date))
  .encode('y', 'price')
  .encode('color', 'symbol') 
  .encode('size', 'price') // 设置 size 
  .legend('size', false)
  .style('shape', 'trail'); // 设置 shape

Replies: 1 comment 3 replies

Comment options

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

@pearmini
Comment options

Answer selected by pearmini
@ChristmasFox
Comment options

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