excel-charts

VBA: Chart_Data points not visible in graph

喜你入骨 提交于 2021-02-11 18:24:39
问题 I dont get the line curve for the data given below however I see the data being plotted but not visible as a smooth line. Please help. Column B Column C x y 0.00 0.00 -0.10 0.29 -0.35 0.48 -0.65 0.48 -0.90 0.29 -1.00 0.00 Set ch = ActiveSheet.ChartObjects("Chart 1") ActiveChart.ChartType = xlXYScatterSmoothNoMarkers ch.Activate p=1 For i = 1 To 6 ser_count = ActiveChart.SeriesCollection.Count p = ser_count + 1 ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(p).XValues =

Excel sunburst chart: Some labels missing

孤街浪徒 提交于 2021-01-27 13:41:30
问题 I've made a sunburst chart in Excel (2016) and want to add labels to all data points. The problem is, that Excel discards some of the labels automatically: It seems that labels are removed either because the datapoint is too small or the label string too long. How can I get Excel to show all labels? 回答1: Short answer is no. Sunburst graph doesn't seem to be able to align the data labels in a custom way (labels outside area). You could achieve a very close graph with a Doughnut chart. Needs

Change chart font using VBA

孤者浪人 提交于 2020-08-07 06:11:29
问题 How do I change the font of an Excel chart using VBA? If I manually select the chart, and record a macro while I manually change the font name and size, I get the macro below. But when I immediately replay the macro, it throws a run-time error: "The specified value is out of range." So it looks like the macro recorder has a bug. Which means I can't figure out the code to change the font myself. Sub Macro6() ' ' Macro6 Macro ' ' With ActiveSheet.Shapes("Chart 1").TextFrame2.TextRange.Font

Dynamically select cells and input in chart

 ̄綄美尐妖づ 提交于 2020-06-29 04:09:25
问题 I would like to create a macro that run through a series of data in a table and is able to automatically graph it. The thing is, the data could have more or less points, but the code still needs to be able to select and graph this required data. Here is what I'm working with (below). I would like to be able to graph the vertical coordinate vs. the vertical displacement for each of the point numbers (under column Point No.) on the same graph. As you can see there are four different point

VBA xlBarClustered how do you distinguish between the two different presets?

*爱你&永不变心* 提交于 2020-01-15 09:26:36
问题 I have a chart template saved using the xlBarclustered chart type. I want it to be based upon the left default chart (see image below) but it chooses right. I have another document with a copy of the same code that chooses right. Is it possible to distinguish? When using record macro it has the same code for both left and right charts which is copied below. Thanks Set cht = WS_FS.Shapes.AddChart2(216, xlBarClustered, Left:=WS_FS.Cells(row, 5).Left, Top:=WS_FS.Cells(row, 5).Top, Width:=425,