Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
I have created a ray or radial chart which has data from the origin
(0,0) to a point at (x,y). This creates something like the hands of a clock but with many more 'hands' of different lengths. At the end of each ray I have a data label. Is it possible to line-up the text as an extension of the ray? i.e. put the text at an angle |
#2
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
You can change the orientation of the text to any angle between -90 and +90,
and you can position the labels pretty much anywhere within the plot area. The orientation cannot be done automatically, but I had a project which would update the label orientation whenever the chart source data changed. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ wrote in message ups.com... I have created a ray or radial chart which has data from the origin (0,0) to a point at (x,y). This creates something like the hands of a clock but with many more 'hands' of different lengths. At the end of each ray I have a data label. Is it possible to line-up the text as an extension of the ray? i.e. put the text at an angle |
#3
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
The orientation cannot be done automatically, but I had a project which
would update the label orientation whenever the chart source data changed. - Jon From the two points I can calculate the angle for the label ... How did you change the label orientation to match the source data? (you say it cannot be automatic but then say 'update ...orientation'?). Steve |
#4
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
I had a VBA procedure which ran when the cells changed. It was fired by the
Worksheet_Change event. So it wasn't done automatically within the Excel UI, but it was done automatically with a little help from VBA. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ wrote in message oups.com... The orientation cannot be done automatically, but I had a project which would update the label orientation whenever the chart source data changed. - Jon From the two points I can calculate the angle for the label ... How did you change the label orientation to match the source data? (you say it cannot be automatic but then say 'update ...orientation'?). Steve |
#5
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Is this complex code? I have precious little experience in VB and
would need some hints to get started! |
#6
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Hi,
Here is my version of the code to radiate your text labels. Assumes you 1 series has data labels applied. Select chart and run code Sub MakeSpokeText() Dim lngPoint As Long Dim sngX As Single Dim sngY As Single Dim dblPI As Double Dim sngAngle As Single dblPI = Application.WorksheetFunction.Pi With ActiveChart With .SeriesCollection(1) For lngPoint = 1 To .Points.Count sngX = Application.WorksheetFunction.Index( _ ..XValues, 1, lngPoint) sngY = Application.WorksheetFunction.Index( _ ..Values, 1, lngPoint) If IsNumeric(sngX) And IsNumeric(sngY) Then If sngX = 0 And sngY = 0 Then ' ignore center points Else sngAngle = Atn(sngY / sngX) * (180 / dblPI) .Points(lngPoint).DataLabel.Orientation = _ sngAngle End If End If Next End With End With End Sub Cheers Andy wrote: Is this complex code? I have precious little experience in VB and would need some hints to get started! |
#7
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Great!
Thanks Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 error "some chart types cannot be combined with other chart types. Select a different chart types" | Charts and Charting in Excel | |||
chart from pivot data does not update x-axis bar chart values - bug | Excel Discussion (Misc queries) | |||
Double-stacked Bar Chart WITH a Secondary Y Axis Line chart? | Charts and Charting in Excel | |||
Huge differences in chart values screws my bar chart scale up. | Charts and Charting in Excel | |||
Excel chart - how to assign the file name in the chart title? | Charts and Charting in Excel |