Draw Objects in Charts

I have a Workbook where I enter my Blood Pressure on a daily
basis and plot it on an X-Y chart over time. The chart
automatically expands the X-axis as new data is entered.
I recently changed medication and placed a draw object
(vertical line with a caption) at the appropriate date.

The problem is that as the X-axis expands and the time
between tick marks contracts, the draw object stays at
the same position and I have to move it to the correct
date tick mark.  As the marks become more compressed,
it has become difficult to move the object to the exact
date.

Is there any way to lock a draw object to a specific
data point so it remains at the same relative position?

Thanks for any help.

Mike Hogan
0
mhogansr (8)
10/5/2005 2:15:11 PM
excel.charting 18370 articles. 0 followers. Follow

2 Replies
390 Views

Similar Articles

[PageSpeed] 27

Hi,

Use an additional data series to draw the line rather than a drawing object.
There are numerous examples of adding datum lines to charts here.
http://www.andypope.info/charts/averageline.htm

Cheers
Andy

Mike Hogan wrote:
> I have a Workbook where I enter my Blood Pressure on a daily
> basis and plot it on an X-Y chart over time. The chart
> automatically expands the X-axis as new data is entered.
> I recently changed medication and placed a draw object
> (vertical line with a caption) at the appropriate date.
> 
> The problem is that as the X-axis expands and the time
> between tick marks contracts, the draw object stays at
> the same position and I have to move it to the correct
> date tick mark.  As the marks become more compressed,
> it has become difficult to move the object to the exact
> date.
> 
> Is there any way to lock a draw object to a specific
> data point so it remains at the same relative position?
> 
> Thanks for any help.
> 
> Mike Hogan

-- 

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
0
andy9699 (3616)
10/5/2005 2:24:39 PM
Andy,
Thanks very much. It was quick and easy, just 4 data entries and
a series name. I guess I should have figured that out for myself,
but I only use charts occasionally and have to relearn the
process each time. Thanks again.

Mike



Andy Pope wrote:
> Hi,
> 
> Use an additional data series to draw the line rather than a drawing 
> object.
> There are numerous examples of adding datum lines to charts here.
> http://www.andypope.info/charts/averageline.htm
> 
> Cheers
> Andy

> 
0
mhogansr (8)
10/6/2005 12:33:11 PM
Reply:

Similar Artilces:

Serializing object graph directly to XML document rather than to text
Is there a way to serialize a graph of objects and get the output as an XML document, without first serializing to text and then parsing the text (I know how to do this but I find it really silly and inefficient). I googled around and from what I found, the answer is NO. Am I missing something obvious? Is there something new coming in .NET 2.0? Of course, I'm also interested in the reverse operation (deserializing directly from XmlDocument rather than from text). Bruno Bruno Jouhier wrote: > Is there a way to serialize a graph of objects and get the output as an XML > ...

pie charts #9
How do I surpress the numbers from showing on a pie chart and just show labels? Select the pie, not the whole chart, and right click it, select Format Data Series ..., Data Labels tab, and select from there. -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Sara" <Sara@discussions.microsoft.com> wrote in message news:74DDD842-6CF7-4C83-8BCF-1E3ABE4C637D@microsoft.com... > How do I surpress the numbers from showing on a pie chart and just show > labels? ...

a new drawing not erase previous drawing?
visual studio c++ 6.0, mfc, graphics in my program a new drawing erases previous drawing. How to manage that all that is drawn stays alive on the window? And is not erased when the window is covered by another window, as well. And that the image does not flicker... Those last two have from time to time appeared in my attempts to solve the first problem. And that I didn't manage at all - make the first drawing, then the second, see them both at the same time on the window. I have tried the following and maybe more: Invalidate(false), InvalidateRect(false), override OnEraseBkgnd, ...

how to draw a bitmap transparently?
Hi, I have an owner draw button associated with a bitmap. In the bitmap editor, I turn off the option "draw opaque" for the bitmap. That is, I make it transparent. However, the the bitmap's background color still shows up on the button. The bitmap has only a solid circle in the middle. What else do I have to do? Please help. Thanks. Tony One thing you can do--and this works only for some restricted cases, which you may or may not have--is to make the button background 192,192,192, and when you LoadImage, you specify LR_MAP3DCOLORS. It will change the 192,192,192 to...

smooth area chart
When I make a line chart, there is a Smoothed Line option in the Format Data Series dialog box. But when I make an area chart, the line that forms the top of the area is jagged. Is there anyway to smooth the top of the area chart or other way to get the desired smoothed area chart? Like a smoothed line with shading underneath. Thanks. ...

Finding second data point on primary axis of two axis chart
Hi I am new to Excel 2007 (moved from Excel 2003). I have a chart with one column on the primary axis and a line on the secondarry axis. I added a second series of data on the primary axis and can't find it. This usued to happend with my previous edition of Excel and was quickly remedied by putting the cursor on the horizontal line until I found it. Is there another way to find that second series of data? Thanks in advance. Al Charbonneau Al Charbonneau _ Select a data series. Use the up-down arrow keys to cycle through the major chart objects until the a...

owner draw CListBox, how to draw "no item found"
Hello, I have an owner draw listbox, in the DrawItem I draw the items. If the listbox doesn't contain any item I would like to display a message "no item found" but this is no item, so DrawItem is the wrong place. Where should I do this? OnPaint, OnEraseBkgnd? I thought I would be able to do something like this for a test (just paint the window blue) but it's always white BOOL CmyListbox::OnEraseBkgnd(CDC* pDC) { if (m_pItemList.GetCount() < 1) { CRect rc; GetClientRect(&rc); pDC->FillSolidRect(rc,RGB(0,0,255)); return TRU...

Chart Standard Deviation
I am trying to chart a bell curve, or what might be called the normal distribution of a set of data. I want to show the standard deviation of this data. I can calculate the standard deviation easy enough. Can I easily chart the data? Stephen - You need to add three vertical lines to your chart. One at the mean, and one each at the mean � the standard deviation. Use one of these techniques for the lines: http://peltiertech.com/Excel/Charts/AddLine.html I'd use the error bar approach, and use the values of the points as data labels to augment the existing X axis. - Jon ---...

Is it possible to put explanatory text at bottom of pie chart?
I'd like to put an explanatory footnote at the bottom of a pie chart to give more info about the data. In charts with an X axis, I've done this by using the X Axis Title option (though maybe there's a better way). I can't figure out a way to do this on a pie chart. Is there one? I'm using Excel 2003 Thanks. How about using a Text Box? If my comments have helped please hit Yes. Thanks. "SMJ Jan" wrote: > I'd like to put an explanatory footnote at the bottom of a pie chart to give > more info about the data. In charts...

Dynamic object creation in MFC
Say I have soething like this: #define ID_MYID 10000 class MyList : CListCtrl { public: MyList(); MyList(CWnd *pparent) ~MyList(); DECLARE_MESSAGE_MAP() afx_msg void OnClick(NMHDR *pNMHDR, LRESULT *pResult); }; BEGIN_MESSAGE_MAP(MyList, CListCtrl) ON_NOTIFY(NM_CLICK,ID_MYIDL,OnClick) END_MESSAGE_MAP() MyList ::MyList (){} MyList ::MyList (CWnd *pparent) { CListCtrl::Create(WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | LVS_REPORT | WS_BORDER, CRect(10,10,20,20),pparent,IDC_MYLIST); } void...

XmlSerializer fails on object loaded from an activated assembly
I'm loading a plugin assembly using Activator.CreateInstanceFrom, and inside this assembly is a settings class which gets serialized to XML. The general code flow is as follows: ObjectHandle pluginHandle = Activator.CreateInstanceFrom(assemblyName, type); object plugin = pluginHandle.Unwrap(); .... // Settings is from the plugin Assembly loaded by the Activator XmlSerializer x = new XmlSerializer(typeof(Settings)); x.Serialize(settingsFile, _settings); // blows up here with this exception: System.InvalidOperationException: There was an error generating the XML document. ---> System....

Show/Hide Charts
I have several Charts on one sheet. is there any way to show and hide individual charts by programming buttons to select them. i.e. Button1 show chart1 Button2 Hide chart2 etc... Hi John, A simply macro to assign to a button would be; Sub Button3_Click() ActiveSheet.ChartObjects("Chart 1").Visible = _ Not ActiveSheet.ChartObjects("Chart 1").Visible End Sub You will need to alter the name of the chartobject to suit. To see the chartobject name hold the shift key and then select the chart. The name should appear in the NameBox next to the formula bar. John wrote...

Charting like a staircase
Good morning, Is there a way to chart a graph that looks like a staircase where the X axis is form 0 to 12 and the Y axilx would be dollars. Say that 0 to 3 is one step the goes up (straight) one step that span form 3 to 6 etc.? I have Office 2000. Thank you for your suggestions Daniel - Go to Tushar Mehta's web site and look for the Step Chart page: http://tushar-mehta.com - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Daniel wrote: > Good morning, Is there a way to chart a gra...

Line chart: Dates in uneven intervalls on x-achsis #2
'Supplementary' questions: Is there a clever way to make excel recogniz that '3 months' stands for '0.25 years', and '6 months' stands for '0. years'? I know, this is only cosmetics. Nevertheless it would be interesting ;) Gil -- gdavid ----------------------------------------------------------------------- gdavids's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1589 View this thread: http://www.excelforum.com/showthread.php?threadid=27378 You could use a helper column that divides months by 12 to scale as years. Jer...

Draw a horizontal line after the last record is printed on each pa
The details section of my report draws vertical lines which grow to accomodate text size changes. I would like to have a horizontal line drawn when last record finishes printing on the page and joins the end of the last vertical line to make a table. Please help. Thanks. -- Lydia Liu Access/VB Programmer There was at least one answer posted to your same question yesterday. -- Duane Hookom Microsoft Access MVP "Lydia" wrote: > The details section of my report draws vertical lines which grow to > accomodate text size changes. I would like to ha...

Anyone want to draw roads?
Just thought that if anyone wants to do diagrams with roads or rivers as double lines then Jeff Lanam (this n/group) kindly provided me with this link to a free programme called OCAD. Its a tiny file, is EASY to use and the results can be exported as a .bmp into Publisher. www.ocad.com I asked on this newsgroup how to achieve this and many threads resulted, so thought I'd post the solution. Many thanks Jeff (see reply to your post) Chrissss........ Glad you solved your map problem. An interesting program. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.o...

Problem with chart and formula
Hi all, A user has a problem with an Excel 2003 workbook. He has created a HLOOKUP formula in a cell, this works fine. He has also created a chart, the heading of this chart is derived from the HLOOKUP value. This all works fine when the chart is below the HLOOKUP cell, but the users wants to put the chart over the HLOOKUP cell, thus hiding it. When he does this it is as though Excel is constantly updating or refreshing. When it is moved back this stops. I know we can work around this problem, but I just wanted to know why this happens. Has anyone got any ideas? Thanks, Gary. Hi, Just...

excel and scientific charts
I would like to plot professional scattered charts in excel like in gnuplot. I want to plot almost 500-600 numeric datas but the graphic results are not very beautiful. I've tried to change axis and scale but is not very good. Is there the possibility to obtain better charts? a plug-in? vba? thankx. For possibilites see http://groups.google.com/groups? selm=MPG.17580d283c5b24e598a63e%40msnews.microsoft.com -- Regards, Tushar Mehta, MS MVP -- Excel www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <W2HXb.316276$_P...

RE:Combing Pivot and Non-Pivot datasets for 2-axis charts.
Hello I've created a 2-axis Pivot chart. The 1st axis will set the data from my Pivot table, however how can I set the data from the second axes to come from a NON-PIVOT TABLE? In other words I need to know how to select data from two different table - 1 Pivot and 1 Non-Pivot data. Kind regards Jaspal singh Dhuga You can do this using a non-pivot chart. Create a chart of the non-pivot table data. Then go to Chart menu > Source Data > Series tab, and one-by-one add the series that use pivot table data. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutio...

exceeded the maximum of 250 objects of type "objtMessage".
Mapi session "/o=Burke/ou=BI_SNFE/cn=Recipients/cn=FSmith" exceeded the maximum of 250 objects of type "objtMessage". I read the KB articles but I'm still confused because none of the causes fit our situation. Could it be caused by a user having more than 250 emails in her inbox and she has the preview turned on? ...

help me to change the color of two series in a chart into the same
I have created a chart with 2 series. the first is pink and the 2nd is black.I want to change them into the same color but i dunno how to do it . Would someone help me , pls -- KhanhNguyen ------------------------------------------------------------------------ KhanhNguyen's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=33697 View this thread: http://www.excelforum.com/showthread.php?threadid=534732 Hi, Double click one of the series and use the format dialog, Patterns tab, to change the colour. Cheers Andy KhanhNguyen wrote: > I have created a chart ...

object linking and embedding
hi, we have several computers linked over a network and on all these systems whenever you open an excel file you get an error saying something like"object linking and embedding...." not supported or something,and excel closes after a while.anyone know what the matter could be?though i believe it started when a particular excel file was opened that was copied on a floppy from another system not on the network. One poster (Lutz Meyer) guessed that this was the cause of his problems. I haven't seen any confirmation/denial, but you may want to read his post: http://groups.goo...

xsd.exe Object reference not set to an instance of an object.
I am trying to generate a class from an xsd and i get this error. Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft (R) .NET Framework, Version 1.1.4322.573] Copyright (C) Microsoft Corporation 1998-2002. All rights reserved. Error: Error generating classes for schema 'adf_message'. - Object reference not set to an instance of an object. If you would like more help, please type "xsd /?". The XSD files all validate in VS.Net and in XMLspy. I can't find any documentation to help track down what this means or how to correct this. Could someone point me i...

Drawing graphs on Modal dialogs
I've encounter a strange phenomenon: I have an MFC application that creates a child dialog using DoModal(). Within this child dialog I have a couple of buttons and a graph plot drawn within the area of a Cstatic using a third party API from GraphicsServer. This modal dialog has a minimize button, but when I minimize the dialog, the graph doesn't minimize with the dialog is always on top of the screen. Has anyone encountered this problem? Do you think is is a GraphicsServer issue or a Microsoft issue? I've called Graphics Server and they say that they haven't countered my proble...

Chart name in Named box
Hi, If I click on a chart, then the named box either shows chart area or plot area (or value axis etc). But I want to know the name of the chart itself. I have tried clicking on the border of the chart, but not able to get the name displayed. Im using an efficient way ( MsgBox ActiveChart.Name ) to know the name of the chart. Can somebody please guide me. Regards, HP India Oops, I didnt see the post just before mine. Shift key did it. Thanks Andy, Regards, HP India Hari wrote: > Hi, > > If I click on a chart, then the named box either shows chart area or > plot area (or ...