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
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.
On the line chart property pages, go to appearance and make sure that the "Break lines on empty values" checkbox is checked.
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.
Related
I'm new to Tibco SpotFire, so please forgive any mistakes in terminology, etc.
I have a line chart with two columns from the data table selected to be shown on the y-axis. I would like to make an itemized menu where you can select one item at a time, such that which two data columns are shown on the y-axis is a function of which item in the itemized menu is chosen.
For example, let's say my data table column names are Col_1, Col_2, Col_3, Col_4, Col_5, and Col_6. I want to make an itemized selection menu with items A, B, and C, such that...
If A is selected, Col_1 and Col_2 are the data columns used by the y-axis.
If B is selected, Col_3 and Col_4 are the data columns used by the y-axis.
If C is selected, Col_5 and Col_6 are the data columns used by the y-axis.
How can I accomplish this? Currently, I know neither how to make an itemized selection menu at all, nor how to link the y-axis data columns to it.
Thanks for any help.
P.S. I'm betting there is a technical name for what I'm calling an "itemized selection menu" above. If someone knows what it is, please let me know and I will edit this post accordingly.
You'll need a text box and a line chart. In the text box, add a Property Control (Drop-down list). You'll want to create a new document property that looks something like this:
After that, you'll need to tie in the Document Property to your plot. Some code like the following should achieve what you are looking for:
case when DocumentProperty("Selector")="Col1Col2" then Sum([X])
when DocumentProperty("Selector")="Col3Col4" then Sum([Y])
when DocumentProperty("Selector")="Col5Col6" then Sum([Z])
end,
case when DocumentProperty("Selector")="Col1Col2" then Sum([XX])
when DocumentProperty("Selector")="Col3Col4" then Sum([YY])
when DocumentProperty("Selector")="Col5Col6" then Sum([ZZ])
end
Where column [X] and [XX] would be tied to "Col1Col2" and so on. Now, selecting "A" from the drop down in the text box will plot [X] and [XX] on your plot.
The question is regarding the top bar chart.
I used Trellis tab in Properties to divide among AL and NL. As you can see, the values of the team that belong to the other league were filtered, and yet there still is an empty space allotted for the filtered columns. How to I remove the filtered columns, and display only the categories that are relevant?
So basically I do not want any empty spaces for each AL and NL chart.
Thank you
This is how Trellis works. If you want them completely separated create two separate bar charts and limit the data using expressions, or apply a custom filtering scheme. The first option is the simplest and is my preferred method.
Right Click > Properties > Data > Limit Data Using Expressions > Edit
Expression: [leagueColumn] = 'AL' or if you want to be explicit, yet have the same effect, if([leagueColumn] = 'AL', TRUE, FALSE)
Do this for the other chart, using NL as well.
I need to filter data in a chart using a parameter. To be more specific, the user enter a parameter corresponding to a production Line (Line 1,Line 2, Line 3).
When he made his choice, a table appears with informations for this specific line (Line, Machine, Time). The time column refers to the Down Time of the machine (entered by another operator).
I displayed a chart that has to be dynamic and has to show the Machines (of the specified line) as X axis and their stop time as Y axis.
The problem is that the chart doesn't display the machines of the specified line (In the parameter) but all the lines's machines.
I have to put a filter of change the expression of the X axis but I don't know what to put for the expression.
The lines, machines, times, come from a SharePoint List.
If you have any idea...
Thank you!
You should just be able to go to DataSet Properties, Filters and then add Parameters!.Value = Fields!Machine.Value, and that should cause the chart to just display for rows where the Machine field matches your parameter value
Found the solution: I added a filter to the X axis "Machine" that says "Lines"=Parameter. and it displays the right machines.
I have a view that displays data from several categories, where the category (bug severity in my case) is color-coded into the background color of individual entries. Now I'd like to apply the same background color to the category line itself.
As the column setting the background color for the rest of the line isn't displayed in category rows, the setting isn't applied. Is there a workaround for that?
Taken from: http://www-10.lotus.com/ldd/nd6forum.nsf/0/2765b9380021c666852572d800589f9d?OpenDocument
Here is an awkward method that works to color your category rows
differently.
Put a column before all the categorized columns. This will be your color column. Check the Use Value as Color property of the column
properties.
Use one of the functions below:
#If(#IsCategory("any")="any";any;1:1:1)
#If(#IsCategory("x")="y";z;1:1:1)
Note: in the function above, where the word "any" appears, or "x" "y"
and "z", it can be anything, matching or not. It will always evaluate
to false. If you try just #IsCategory, it will error out because that
doesn't return true. And no match you try will ever cause a true
comparison.
That said, the result is that all rows will be colored black if they
are not categories. This overrides the default text color. If you want
another color than black, then adjust the 1:1:1 accordingly
(red:green:blue up to 255 for each position, red= 255:0:0)
Now go to any column and set the text color to the row you want your
categorized rows to appear in, and click Apply to All. Voila!
I was trying to figure out how to do this programmatically and then I wondered, why not just borrow from the mail template? I'd like to suggest you check into how the ColorProfile is used there to allow users to change their color preferences based on a field value (sender name) and see if it can be done for your case.
Or, have them either access the view via a browser client or XPages in the Notes client and assign a class to that dependent on the severity.
You could build the category column formula with HTML such that when it is severe the value is "<tr class='severe'><td>CategoryNameValueHere</td></tr>" or something along those lines, right?
It is obviously possible to hide individual data points in an Excel line chart.
Select a data point.
Right click -> Format Data Point...
Select Patterns
Tab Set Line to None
How do you accomplish the same thing in VBA? Intuition tells me there should be a property on the Point object Chart.SeriesCollection(<index>).Points(<index> which deals with this...
Actually if you are going to use SpyJournal's answer it has to be =IF(b2=0,NA(),b2), otherwise Excel just recognizes it as text, not as an 'official' #N/A
"Describe it to the teddy bear" works almost every time...
You have to go to the Border child object of the Point object and set its LineStyle to xlNone.
As a general tip: If you know how to do something in excel, but don't know how to do it in VBA you could just record a macro and look at the recorded VBA-code (works at least most of the time)
There is a Non VBA solution as well that can also be controlled from the VBA code as well.
In excel a data point represented by a #N/A will not display. Thus you can use a formula - the easiest is an IF function - that returns an #N/A as text in the graph data. This data point will then not display which means you don't need to try and manipulate the format for it.
An example is simply to generate your graph data in a table, and then replicate it below with a formula that simply does this
=If(B2=0,"#N/A",B2)
This works when you want to stop line charts from displaying 0 values for example.
This is probably too late to be of assistance but the answer by SpyJournal, whilst easy and elegant,is slightly incorrect as it is necessary to omit the quotes around #N/A
Yes. It doesn't have to have the quotes to be a true not available cell content
but for me N/A still plot as 0 in my charts.
The only way I can get it not to plot is to have the cell blank.
I tried "#N/A" with quotes in Excel 207 and as a result the data point is shown like a zero in the graph. It Works without the quotes.