hminky Posted July 30, 2007 Report Share Posted July 30, 2007 I made a MouseUp event. void CDynamicDlg::OnMouseDownClientserver1(LPDISPATCH sender, LPDISPATCH args) { Cfx62::_MouseEventArgsXPtr argsPtr; argsPtr = args; CString strY; int x = argsPtr->X; int y = argsPtr->Y; Cfx62::HitType type = argsPtr->_HitType; int series = argsPtr->Series; double value = argsPtr->Value; When MouseDown at DataEditor, I can get correct HitType (HitType_DataEditor) and series. btw, MouseDown at LegendBox, I can get correct HitType (HitType_LegendBox) but Series always return -1. Is it a bug? (when I test with winforms version, it works) Do you have any idea, how can I get Series number in Legendbox? Link to comment Share on other sites More sharing options...
JuanC Posted July 30, 2007 Report Share Posted July 30, 2007 You can get the index of the element in the legendbox by using the Point property, note that sometimes the legend box does show one element per point (e.g. in a pie chart) so it was kind of a coin toss. Looking backward we could have passed the same value in both Series and Point properties or try to pass the right property depending on what was being shown. JuanC Link to comment Share on other sites More sharing options...
hminky Posted July 30, 2007 Author Report Share Posted July 30, 2007 Point Works! Thank you! Two more questions 1. Can I move LegendBox to inside Chart? LegendBox takes too much spaces but have to be shown. Is there any way? 2. please give me an idea to show an selected state. for example, if click series1 in legendbox, I want to show "Series1 is selected" and ready to some action to "Series1". can I border only series1? or something like that? Can I get position and size of series1 in Legend box? Highlight is not sufficient to me when I mousemove to other position, highlight turns off. Link to comment Share on other sites More sharing options...
JuanC Posted July 31, 2007 Report Share Posted July 31, 2007 1. Can I move LegendBox to inside Chart? No. There is no easy way to move the legend box inside the chart and still make sure it does not hide your data points, specially if the legend box is big. 2. please give me an idea to show an selected state. Unfortunately ChartFX does not have the concept of selection on any of the items it plots (legend box, markers, etc.). JuanC Link to comment Share on other sites More sharing options...
hminky Posted August 8, 2007 Author Report Share Posted August 8, 2007 Dear, I tried your suggestions and It worked. but When I set invisible to some series, the Point number is no longer means Series number. for example, there are 0, 1, 2 series and I set Series1 to invisible, (m_chartPtr->Series->Item[1]->Visible = FALSE;) Point 0 means Series 0, but Point 1 means Series 2 so, I have to manage Series-Point number relations. Is this bug or by design? Is it fixed in CFX 2005? TestChartFX.zip Link to comment Share on other sites More sharing options...
JuanC Posted August 8, 2007 Report Share Posted August 8, 2007 I would say is a bug but one that we will probably not fix as it could affect somebody relying on that behavior. I am afraid you will have to loop through the series and skip the invisible ones. This was corrected in ChartFX for VS 2005 but we do not have a COM version of that product only .NET JuanC Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.