multiple x values spotfire - scatter-plot

I am currently trying to adapt an excel dashboard I created a few years back into spotfire. The data previously fit onto one page, but this year the number of metrics has doubled and I thought it would be a good opportunity to try spotfire.
The current dashboard has a number of scatter plot charts showing the values from a range of cells (rank 1-5). Overlaid is another scatter plot that shows the groups results.
I have found it easy enough to run the scatter plot in Excel based on a range of data, but as of right now I am stumped on how to choose a range of values for my spotfire scatters.
Here is an example (in excel) of what I am trying to accomplish. The data example is how my data is currently setup.
Would you have any tips on how I may be able to produce a similar chart in Spotfire?

You can create a Document.Properties with all the values you want. Then create a slider in a text area with this document properties. You will be able to select a range of values with this slider.
To use your range in a scatter plot, on the axis you want, right click and custom expression then write something like $(my_docproperty).
Hope it will a solution to your problem !

Related

How do I change the order of panels in a ggpubr plot with multiple data ranges?

I'm a novice and using the ggpubr package in R to make a lollipop plot but I can't figure out how simpyly change back the order of panels into what I originally intended in the dataframe. For instance, I have the group columns order of a dataset that I would like to maintain in the plot as: <=-2, -2>=-1, -1><0, 0, 0>=1, 1>=2, 2>=3, 3><4, >=4. The ggdotchart() call produces different panel order as seen in the attachment lollipop panels. See example code below.
df1_logchange<-data.frame() #ncol=9
head(df1_logchange)
colnames(df1_logchange)<-c("comps","<=-2","-2>=-1","-1>
<0","0","0>=1","1>=2","2>=3","3><4",">=4")
df1_logchange<-df1_logchange %>%
select(comps,"<=-2","-2>=-1","-1><0","0","0>=1","1>=2","2>=3","3>
<4",">=4") %>% pivot_longer(cols=c("<=-2","-2>=-1","-1>
<0","0","0>=1","1>=2","2>=3","3><4",">=4"),
names_to="logchange_range",
values_to="value")
ggdotchart(df1_logchange,x="comps",y="value",
group="logchange_range",color="logchange_range",
palette="jco",
add="segment",position=position_dodge(0.3),
sorting="none",
facet.by="logchange_range",
rotate=T,
legend="none")
I would like to keep the plotted panel order as the ranges of data, preferably by-row from left to right. Any help is appreciated.

create a double donut chart in a single view with two measure values in tableau

I need to create this visual in a single view in tableau. The chart contains two value, one is ytd and other one is lytd. both are measures(made by a calculated field). Need help to achieve this visual.
Let's just look at how to show two pie charts on one sheet, which isn't obvious!
In Tableau Public take the Superstore and make dual pie charts for two variables, sales and profits, including all data in each chart.
The trick is to use a new calculated variable MIN(1) ( yes, minimum of one. ) and put that up on the rows shelf. ( To be honest I have no idea at all why this works. )
Here's btProvider's youtube video that suggested this idea.
https://www.youtube.com/watch?v=1rqkjkUsUj4
and here's a polished version what I got relatively easily
Here's a view of what the sheet looks like with Min(1) up on the rows shelf twice which produces two pie charts that can be separately defined on the Marks card.
I put my whole workbook up on Tableau Public so you can see what I did.
https://public.tableau.com/app/profile/wade.schuette/viz/dualpiechartsdemo/Dashboard1?publish=yes

Error in loading data using Dimple.js

I am trying to draw simple scatter plot using dimple.js. It works if my dataset is small . But if i take large dataset of index 15000 then it will not works, How can i fix this problem?
The browser can handle 2k or so records when creating dimple charts, any more and the browser will crash (too complex). Aggregate your data offline or use something like http://dimplecharts.com which has an online pivot table tool that could potentially group and sum values. That tool creates a file. Then select a scatter plot layout in dimplecharts and then the shuffle button to load your pivot result into the chart, it does this automatically via the shuffle button.

dc.js heatmap expanding data

I am trying to show machine states over time. Part of this is to reproduce/automate a report that used to be done by hand. It consists of coloring 2minute 'time slices' in Excel based on what the machine is doing.
(Sorry, not enough reputation to post a picture, but it is a classic heatmap where the state drives the color. Some non DC-JS fiddle: http://jsfiddle.net/ww6Lbnc5/4/)
I was able to generate most of what I want in the following jsfiddle:
http://jsfiddle.net/hwhfxz2t/14/
See fiddle for code.
The total state duration (for selected time frame) is shown in the pieChart, followed by the individual state lines and then the heatmap that people are used to. (the ZOOM and date selection buttons do not work in the fiddle but are there to select specific data ranges or zoom in if you like).
The line charts uses the original representation of the states, which consists of a time the state is entered and a duration.
In order to make the heat map work, I had to (I think) take the original data and convert it into individual minute chunks and mark them with a state. So for instance the original data specifying:
RUN state starting 14:30 for 300 seconds
becomes:
14:30=RUN, 14:31=RUN, 14:32=RUN, 14:33=RUN and 14:34=RUN
The code in lines 233-297 loops through the original data and generates a new one that does this. In cases where there is more than one state within a given minute, the last state survives.
This works okay but it seems that this code is exactly what is normally done in group().reduce(add,remove,init). But in this case I need to add multiple timeslots depending on the duration of a state.
Also, because it is now using a different crossfilter, maps do not update each other.
Here are my questions related to this:
Can I display a heatmap without supplying information for all individual
'cells'? (i.e. straddle cells based on a value, similar to rowspan in a table)
Can I add multiple values at once inside group().reduce()?
Is there an easy way to invert the yAxis so 0 is at the top?
When clicking a row in the heatmap, it selects a column and vice-versa?
I'm not sure if this should be in the crossfilter group. If so please ignore my rambling. If someone knows how to keep the charts linked by grouping better, please let me know.
--Nico
Concerning Question 3:
DC.js heatmaps currently do not support custom order functions on axis but there is a pull request that has been merged into the developing branch and should be accessible to the public soon.
You could manually edit the dc.js file to set the sorting in heatmaps to a custom function. In the latest (2.0.0-beta10) version it is the following line:
rowValues.sort(d3.ascending);
and accordingly
colValues.sort(d3.ascending);

Dynamically apply different y-axes to data in a jqplot

I'm trying to create a jqplot with multiple lines plotted on it, where the number of data series depends on user input.
Now I want to use two different y-axes for certain kinds of results, but the jqplot documentation only shows how to assign different y-axis to series in a static way.
Is there a dynamic solution?
you will need to change the option string when ever you need to have different y axises, But still you will need to re draw the chart as well..

Resources