知識庫

How To Fix Color Separation Rather Than Gradient in Line Chart


發佈時間 : 19 Mar 2020
上次修改日期 : 24 Aug 2022

問題

When placing ATTR discrete dimension to color in a line chart, the line gets gradient as below. How can I set a fixed color separation?
User-added image

環境

  • Tableau Desktop

解決方法

A possible workaround to use dual axes of line and circle.
User-added image

Here are steps demonstrated in the attached workbook.
  1. Place Order Date to columns and select continuous year.
  2. Place Sales to rows.
  3. Place Category to color and right click to set to Attribute.
  4. Place one more Sales to columns and right click Dual Axis.
  5. Open SUM(Sales) mark card and remove Category from color.
  6. Open SUM(Sales)(2) mark card and change mark type to Circle.
  7. Right click the right Y axis and click Synchronized Axis.

原因

The ability to fix color separation in a line chart is currently not build in a product.
 
這篇文章是否解決了問題?