Search code examples
spotfire

Spotfire - Line chart


Is there an option in Spotfire for the line chart to break/ignore whenever it encounters 0. I don't like to see line connecting to 0 on the chart as it creates distorted view.

Thank you!

Regards, KSP


Solution

  • The solution to this might depend a bit on your data, but one simple solution would be to use the fact that the line chart can break the line on empty values. Just make sure that the y axis value is empty when you want it to.

    1. On the line chart property pages, go to appearance and make sure that the "Break lines on empty values" checkbox is checked.
    2. On the y axis, right click the axis control and go to 'Custom Expression'. Enter an if statement that will replace the data you do not want to show. If for instance I have a line chart showing the count of values the custom expression would say 'count()'. If I want to not show any zero values I would replace that with:

      if (count()=0, null, count())
      

    Replace count() with your own expression in the example above.