Tableau - Is there a way to drill down by clicking on the line? - tableau-api

I have the following chart
I have created a parameter called IO OR LINE with two values: IO and LINE
then created a computed item called IO DRILL DOWN which is defined as:
if ([IO OR LINE] == 'IO') then [IO] else [Line Item] end
where the IO and Line Item are two dimensions
In the parameter drop down, if I choose LINE, I will get the chart
My question: I want to do the operations above but by clicking on the blue line in the first chart which will drill down as shown in the bottom chart? I don't like the parameter drop down solution

You could get this effect by:
generating 2 identical dashboards, one with the single line and
the other with the detailed view
Set up a Filter Action for when you click on the blue single line it takes you to the other dashboard with the multi-lines. If the dashboards are exactly the same and the performance is quick, this will give you what you are describing but it's a bit of an illusion.
At first, I thought you could do this somehow with layout containers and filter actions, but I got stumped when it came down to hiding the original view. https://www.interworks.com/blog/dwyers/2012/05/10/using-layout-containers-hide-views-your-tableau-dashboard

Related

How to display sheet(s) on dashboard using navigation?

I'm creating a dashboard on Tableau and I want to have a set of navigation buttons that correspond with the sheets I've created. When a button is clicked I want the corresponding sheet to be displayed on my dashboard instead of navigating to the sheet itself. I want all of the sheets to be displayed in the same place on my dashboard. For example, If button 1 is clicked I want sheet 1 to be displayed on my dashboard. If button 2 is clicked I want sheet 2 to be displayed on the dashboard in the same place. I'm new to Tableau and would appreciate any help with this!
The easiest way to achieve this is using parameters.
As a first step you need to creat a parameter with a list of values matching the number of worksheet, like: Worksheet 1, Worksheet 2, etc...
Then you have to create N calculated fields in order to check if the "actual" worksheet is the one "selected in the parameter", using "ok" and "ko" as results for your filters, keeping just "ok".
The formula could be something like this (assuming you're doing the CF for the 1st worksheet, and the other ones differ just for the value):
if parameter = 'Worksheet 1' then 'ok' else 'ko' end
Doing so, all you're worksheets will present data just one at a time because all of them but the one matching the valus in parameter will be blank.
Then you can create your dashboard putting a vertical (horizontal as well if you like) container in it which will be the the "place" where you'll drag all your worksheets.
Be sure to NOT modify the spacing and height of them; just le tableau handle that for you, otherwise the trick won't work.
Once you're finished you will end up having a container with N worsheets in it, with just one of them dysplayed at once.
Once you'll become familiar with parametr actions, you will no longer need to have the parameter displayed on the dashboard (show parameter) because using a worksheet connected to the parameter values you will be able to decide the value of the parameter via click on your additional worksheet acting like a series of button (woeksheet 1, worksheet 2, etc...)

How to mix bar and lines in Grafana in one chart

How can I display one dataseries as bar and another as a line in one graph like it is used in the last comment of: see last picture
Short answer:
It's not possible (yet) using the Grafana UI, only by hand.
Long answer:
As far as I know there is no way of doing this using the UI switches; you'll have to use the use the "alias or regex" fields below the visualisation configuration.
Prepare your data
Before you start, make sure that your queries A and B retrieve actual data. You won't see your data otherwise and be confused why they're not showing.
Adding fields and values to the aliases
Once you are selecting the correct data you want to display, just add the following on the visualisation section of the graph at the 'alias or regex' fields:
Add 2 overrides, one for each value you want to display using the 'Add series override' button.
Add a "Bars:false" option flag and a "Lines:true" for the value you want as a line.
Be sure to use the exact opposite values for your bars ("Bars:true" & "Lines:false")
Add a 'Y-axis: 2' to the value you want to have on the right side of your graph.
Optionally, you can add a "Z-index: 3" for the value that you want to have on top (I added this option to the line to make sure it's always drawing on top of the bars).
Enjoy
You should now have a nice graph with 2 types of data and visualisations in one; something like this:
For those who were asking in the comment section, yes this isn't available in version 8, however, you can still change the time series visualization to graph(old) so you can set the alias/regex.

Change line behavior of a combined chart in SAPUI5 VizFrame

I am using a combined chart (Stacked Column + Line) for my application. Is it possible to change the line plotting?. (somewhat like shown in RED in the image). If yes then how is it possible?
I'm sure you already know the VIZ documentation where you can find all possible properties of VizFrame. As far as I know there currently is no way to get the behavior you're asking for except for writing your own lineRenderer (vizProperties.plotArea.lineRenderer). There is one alternative line plotting mode available which is smoothening it but I'm sure thats not what you want.
However you could use a second series of column chart instead. Just use a standard column chart and add two data series instead of one. I think this would show the exact information you're trying to get with the current diagram just no connection between them.

Bokeh - How to use box tool without default selections?

I have built a bokeh app that allows users to select windows in data and run python code to find and label (with markers) extreme values within these limits. For ease of interaction, I use the box select tool for the range selection. My problem arises when repeating this process for subsequent cases. After markers are placed for the results, they are rendered invisible by setting alpha to zero and another case needs to be chosen. When the new select box includes previous markers, they become visible based on the selection. How do I override this default behavior? Can markers be made unselectable? or can I add code to the customJS to hide them after they are selected?
Thanks in advance for any help!
There are a few possible approaches. If you just want non-selected glyphs to "disappear" visually, you can set a policy to do that as described here:
http://docs.bokeh.org/en/latest/docs/user_guide/styling.html#selected-and-unselected-glyphs
Basically, for bokeh.plotting, pass
nonselection_fill_alpha=0.0,
nonselection_line_alpha=0.0,
as arguments to your plot.circle call or whatever. Or if you are using the low level bokeh.models interface, something like:
renderer.nonselection_glyph = Circle(fill_alpha=0.0, line_alpha=0.0)
But be aware (I think you already are) that the invisible markers are still there, and still selectable if the user happens to draw a box over them with the selection tool.
If you truly want only a subset of the data to be visible and selectable after a selection, I'd say you want to replace the data in the column data source wholesale with the subset in your selection callback.

d3 bar chart selectAll before appending

I've been learning more about the d3 visualization library, and I've seen a few examples of bar charts that have a snippet that looks like
chart.selectAll("rect")
.data(data)
.enter().append("rect")
.attr("y", y)
.attr("width", x)
.attr("height", y.rangeBand());
My confusion is with the first selectAll line. What is the purpose of selecting all rects before they exist since we'll be appending new rects on data enter? Does what goes in the selectAll matter if none of those elements exist?
It is part of the declarative nature of the D3 language. The Thinking with Joins article explains it in detail. An excerpt:
But what’s with the selectAll("circle")? Why do you have to select
elements that don’t exist in order to create new ones? WAT.
Here’s the deal: instead of telling D3 how to do something, tell D3
what you want. In this case, you want the circle elements to
correspond to data: you want one circle per datum. Instead of
instructing D3 to create circles, then, tell D3 that the selection
"circle" should correspond to data—and describe how to get there. This
concept is called the data-join:
This Venn diagram illustrates the data-join. Data bound to existing
elements produce the update (inner) selection. Unbound data produce
the enter selection (left), and unbound elements produce the exit
selection (right). Data Enter Update Elements Exit Thinking with joins
reveals the mystery behind the sequence:
The selectAll("circle") returns the empty selection, since the SVG
container element (svg) is empty. No magic here.
The empty selection is joined to data: data(data). The data method
binds data to elements, producing three virtual selections: enter,
update and exit. The enter selection contains placeholders for any
missing elements. The update selection contains existing elements,
bound to data. Any remaining elements end up in the exit selection for
removal.
Since the selection was empty, all data ends up as placeholder nodes
in enter().
This is the same append as in the first example, but applied to
multiple placeholders; selection methods implicitly iterate over
selected elements. The missing elements are added to the SVG container
by append("circle").
So that’s it. You wanted the selection "circle" to correspond to data,
and you described how to create the missing elements.
In your example selectAll("rect") is called first. But it returns an empty selection.
data(data) will bind the empty selection with the data. It creates new empty selections.
.enter() identifies any DOM elements that needs to be added when the joined array is longer than the selection.
append("rect") appends a rectangle to each empty selection, which is no longer empty
It is well explained and detailed on this section: D3.js data binding, How it works?