I'd like to create an excel dashboard where the user selects which series are plotted based on a drop down menu. The series for the chart is derived as follows:
=IF(J$6="Plot",100 * D8/D$108,"")
etc.
If I turn off "Plot" the series disappears form the chart but an empty line persists in the legend. I'd like the legend to include only the series I have selected.
Thank you in advance,
Tikhon
Related
I am using vba to create a pivot chart that is then filtered for the top 10 categories. For the legend we would like to include those categories NOT in the pie chart. I am able to create a list of the items that are not included in the pie chart, but I haven't figured out how to add them to the legend. I tried setting the XValues alone but that didn't work. Is it possible to create a custom legend? I wouldn't need the color boxes but I would like to add the number and and percent similar to those that are displayed for the top 10 categories in the pie chart.
I am trying to create a static format for pivot chart in MS Excel (including same colors and the same chart-type). I have created a format template and applied it to the pivot chart, but after applying filter within pivot chart, all defined colors and chart type are gone. They are set to default.
I have researched and it seems that this is a typical behaviour for Pivot charts/Filters in Excel, but someone maybe knows workaround. Because in my case predefined colors and chart type are really important!
I have found the workaroud in Excel and VBA.
Excel steps
Choose one specific filter (it is best to select the default filter in the pivot diagram)
First set all colors for all series manually in data series options (click twice on diagram). It is important that the filling is set instead of automatic, single-color filling.
Set diagram type manually (right click -> change diagram type). Select the desired chart type for all data series.
VBA steps (necessary for changing diagram type!)
Right click on the tab where the diagram is located -> Show code
Add Worksheet_PivotTableUpdate subprocedure (every time the pivot table changes, including the filter, this procedure is called)
Activate the chart with:
ActiveSheet.ChartObjects ("chartName"). Activate
Reference the name of the data series that a certain diagram type should have (e.g. line chart)
ActiveCharts.SeriesCollection ("Series_Name"). Select
ActiveCharts.SeriesCollection ("Series_Name"). ChartType = xLine
Here I have a chart
I did a right-click -> "Add labels" , and it read them from my a(H/C) row. Basically, I want it to read label values from the CO2/CH4 row instead, so they would be 0,0.5,1,2,5,10 instead. Of course, I want the chart itself to remain the same, so, the x values of dots are in row "b(O/C)", their y values are in "a(H/C)" row, and their respective labels are read from "CO2/CH4". Can it be done automatically and how (preferrably, without scripting magic)? Rewriting them manually is a pain, really.
You will get the desired results by following the steps below:
Step 1: Click on the Chart
Step 2: Select the Design Tab in Ribbon Bar (Note: “Design Tab” appears only when the Chart is selected)
Step 3: Click on “Select Data” feature in the Design Tab as shown in Screen Shot 1
Step 4: Click on Edit Button as shown in Screen Shot 2
Step 5: Change the Series Name Rage and the data range in “Series Y Values:” as highlighted in Screen shot 3
What about adding the different points as different series and using the series names as labels (instead of the y-values) ?
If you need the "line" between the points (or if you need to add a trendline...), keep the serie you already have (with every point) without labels
Excel 2013 added the capability to use text from worksheet cells as data point labels. If you don't have 2013 (your screen shot looks like 2010), or even if you do, you can use Rob Bovey's free Chart Labeler add-in
I've got a scatter chart in an SSRS report and a requiremetn to label each quadrant of the chart.
When I drop a text box with the label of each quadrant and get it to look just how I want it in the designer all seems well.
But when the report is run the flow based layout of the report put the text boxs vertically under need the scatter chart.
How do I get the text boxes to remain on top of the chart?
In designer
Rendered report
Consider adding the Quadrant labels as a chart title instead of a textbox. You will need to enable the CustomPosition property of the chart title to True in order to place the titles in the corners.
I am unable to post an image without some "reputation" but I was able to add the quadrant titles successfully.
Is it possible to drag and drop the shape of graphs in Excel?
I'm thinking something along the lines of:
-if I click and hold the graph I can drag it up and down
-if I click on a point on the graph and then click and hold on another point, I will drag an interval of the graph up and down
No. What you are asking for is "Interactive charting". The Excel VBA charting interface draws the entire chart based the parameters you define for it. It doesn't have an interface to manipulate the individual components of the chart thru VBA. (Something like move line vertice to new point). In addition, the points of the graph are based on spreadsheet values. So it would have to detect your mouse events over the chart, convert those movements to the scale used in the chart to reverse calculate a value and then change the associated cell in the spreadsheet. And then a graph repaint of the entire chart would be requested. This total repaint would look pretty choppy.