Getting data off of a Graph into a table - vba

This is the yield calculator I'm working with
On the left of it is the input for the assay (crude oil) I'm getting in. It plots it on the graph, which has 6 horizontal lines at temperatures that are cutoffs for oils. Wherever the line crosses the horizontal Lines, I need to get that intersection point and put it in the table on the top right corner of the graph. Right now I'm just guesstimating the number rather than getting an exact one, and it's not automated. I've been trying to do something with VBA but am pretty lost.

Related

How to show/add the legend in a dual axis chart?

I have created a dual axis chart where I'm graphing the arrival time and the departure time in the same graph, and showing the sum of the number of records as the rows.
By default Tableau adds the "Measure Names" into each of my columns Marks and I get an automated Legend showing the "Number of Records" in one colour.
However, this is not useful at all...
I want each time variable (eg. arrival time) to show up in a different colour. The only way I have been able to do this is by removing the "Measure Names" pill from the Marks card and then setting each axis to have its own colour. But as soon as I do this, the Legend disappears and now I finally get a nice graph with a line in each colour, but no legend to show what line is assigned to what colour.
Also the Legend option gets disabled when I use this layout.
How can I add the Legend to this?
Please note that the solution in this post doesn't help to answer this question.
You should be able to create 2 calculated fields that basically mimic Number of Records like
SUM([Number of Records])
Once you have 2 calculated fields, you can name them each what you desire. Then you should be able to use measure names and those separate calculated fields on each card of your dual axis.
Many, but not necessarily all, views people want to make with job start/arrival and end/departure records are easier if you reshape the data to have one data record recording each state-change event, tied by a common key.
So if your data has columns for Date, ID, Event, User -- where Event can be either Arrive or Depart -- then most visualizations will be much easier. In this view, each user that has arrived and departed will get 2 records instead of just 1. And customers that have arrived but not yet departed will get 1 record.
You can leave your original data in its original form and create this reshaped view in a Tableau Data Source using either Tableau Prep or the DataSource page in Tableau Desktop. You'll need to use the Union operator. That way you can have another data source that points to the original format if that is useful also.

How to convert a panel bar chart to multi-line chart in tableau

I am trying to create multi-line subplots such that each subplot represents a rating factor on which firms are rated, and each line represents a firm's change in rating over time. Note that I don't have the date field. I have a string field that says which quarter of the year the Mean of ratings belong to.
I'm new to tableau and I created something like this:
I want to create multiple subplots: one subplot for each of the 8 rating features in the above diagram, and the subplot has multiple lines representing the variation over time for each company. I have 10 companies.
Please guide me on how to achieve this?
A rough sketch of how I Imagine the plot to look like is below:
This will teach you how to make a panel chart in Tableau: https://tarsolutions.co.uk/blog/build-a-dynamic-panel-chart-in-tableau/
It shouldn't to too complex for what you're attempting (fingers crossed!).
Building the panel chart is a little tricky in Tableau. Not terribly hard once you understand table calcs. I suggest starting simpler by moving Measure Names from the Rows shelf to the Pages shelf, then creating the line charts you want - 1 per page. Then learn about table calc partitions and addressing, including “At the Level” to have the info needed to define the panels
To make a colored line chart,
You need one field on columns that you set to display as continuous, making it green. If it is a date field, right click on the field and choose from the second set of groups, like month or quarter.
You need a continuous field on the Rows shelf, use Measure Values in your case
Use a discrete field on color to determine the number of lines, say Shortname
Set the Mark Type to either Automatic or line

Possible to skip plotting a data point in a line chart?

We are missing data for some months. If no lines have the month then it just doesn't show up. If one line has it but another doesn't then it seems to sort that month before all the others which looks strange. So we've added in place holder data with a value of zero for missing months but we'd prefer it not actually plot those points.
Ideally, we'd like for all 12 months to show up in the x axis but if a data point is missing (or zero; whatever would make this easier) then we don't want that point to be plotted.
Is dimple able to do this natively, or would I need to manually remove the point with javascript after the chart has been drawn? And if the latter is the case, any pointers to get me started on how to do that would be appreciated.

How to zoom chart specific area in Excel Using Macro

Hy Everyone,
I have a sheet with chart that has many values with X-Axis. These values are many in numbers some time I feel difficult to view them, So I want to zoom the any area of the chart by selecting any where in the chart. I used recorded macro that only zoom sheet not Chart / Graph. But I want a macro that can zoom any specific area of the chart or graph any where I click or select..
Here is pictures of the sheets...
My suggestion is to limit the x-axis (minimum and maximum) and probably limit the max value of the y-axis. This way it will only show a part of the data within the chart which might result in a better resolution to view then. But there is no built-in zoom like you described. Therefore you will need to code that on your own.
(Sorry for the german screenshot …)
As you see in the example above. I have total data in x-axis from 0 to 450 and in the second chart I limited the x-axis from 100 to 200. Both charts have the same source data, but the second only shows a part of the first.

Using VBA to scale excel graph X-axis?

I'm using a macro to generate graphs from a table such that the x-axis is a time stamp(date, time) and the y-axis is for the data at that time. So far, there is no problem getting this to work but the result is a graph that has "blank space" before and after the data(roughly 5-10 minutes before and after on a 1-hour time-frame). I have space constraints and this cuts into them so I'd like to utilize the entire plot area. Can I eliminate the blank space by extending the data to end of the plot area somehow? Any help is appreciated.
Additionally the files I need to use are for different time frames and lengths of time(ie, different length of excel rows). Is there a way to only graph the rows with content instead of a "worst-case scenario" like using A2:A100000 because I know it will never be greater than 100,000 rows?