Jump to content

Add different columns representing similar data on different days to x-axis and create a line chart


Juan Anaya 2
Go to solution Solved by Gaia Paolini,

Recommended Posts

I am new to Spotfire (I have used a rival software before extensively) so sorry if this is a dumb question. I am trying to look at data across multiple days for manufacturing batches, and I have a particular test I am looking at that has data across multiple days. The data is a column for each day and a row for each batch. I thought to use the parallel coordinate plot but realized it's normalized. I would like to do this without transforming the data if possible because this is a small subset of a large dataset.

I included an excel example and chart as an example. Obviously I can do it in excel but would like to include it with hundreds of batches in a dashboard I am creating to look at issues with this particular parameter.

Link to comment
Share on other sites

Unless you unpivot your data, I would still suggest you use the parallel coordinates. The right axis does show the original scale, and you can hide the left percentages with the Scale Labels tab in the plot Properties. You cannot readjust the scale limits though.

I think unpivoting is the best option for full control. If you are new to Spotfire, I would recommend to watch some of the Dr Spotfire videos.

Maybe this one can help:

If you only want to unpivot a small subsection of the data, you probably would need to write a script that takes a selection of data and returns an unpivoted data table that you can plot. But that is a bit advanced.

Link to comment
Share on other sites

So I guess I wasn't completely accurate in being totally new to Spotfire, as I had used it several years ago, but the desktop application looks and seems to operate completely differently than it was back then. If I am able to unpivot the data, is there a way to generate something that looks like this? What I am looking for is generating a line for each batch, and having those greyed out, with an average line, and then if I select a particular batch, I can highlight that in a color. This is from excel obviously just to illustrate but I also did it in an old version of spotfire, and it seemed much easier at the time than I am currently experiencing.

image.png.bf92d14f9626afee17018e9c84225a3b.png 

Link to comment
Share on other sites

  • Solution

I think it can be done, I put together a Spotfire dxp to exemplify. It appears a lot of ticks, but it is easy once you have done it a few times.

  • I unpivoted the data in the data canvas
  • I added a [Day] calculated column, to extract the numbers from the content of the column, as:
Integer(RXExtract([Category],'\d+',1))
  • I changed the colour of the marking to yellow: top menu > File>Document Properties > Markings
  • I created a line chart.
  • I changed its appearance so marking would appear as a separate colour: right click on plot > Properties > Appearance> Use separate color for marked items.
  • I coloured the chart by [batch] but kept all the colours grey: right click on plot > Properties > Colors.
  • I changed the Y limits to 60 and 105: right click on plot > Properties > Y Axis> Range.
  • I added a calculated column [Avg_value] to represent the average: top menu > Data > Column properties > Insert
Avg([Value]) over ([Category])
  • In the plot, I added a line representing this column: right click on plot > Properties > Lines & curves > Add > Line from column values.
  • I adjusted line thickness in both normal lines and average.

When you click on a line, it is marked in yellow.

image.thumb.png.fd77186bdd508624e1b2e2ba45b855c6.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...