|
Entering some text on the plot |
Posted by John on May-03-2013 20:08 |
|
Hi,
How can we enter some text (Ex: some information related to graph or titles etc) directly on the plot graph/area?
Thanks InAdvance,
John. |
Re: Entering some text on the plot |
Posted by John on May-08-2013 18:44 |
|
Hi,
How can I directly enter some text on chart area ? Please provide an example. Iam using vc++ windows form application.
How to create ImageMap and add objects to it ?
How to create ImageMap for my title and track click event on it ?
Is there any way to add a textbox to my chart ?
How to add a rectangular box containg some data in it to my plot area which alligns
dynamically on the plot area without overlapping with the graph lines ?
Kindly note that Iam using vc++ Windows Form Application.
Thanks in advance.
John. |
Re: Entering some text on the plot |
Posted by John on May-08-2013 20:40 |
|
Hi,
Is there any option to remove the title from the chart.
Thanks,
John. |
Re: Entering some text on the plot |
Posted by Peter Kwan on May-09-2013 02:40 |
|
Hi John,
To enter text, please put a Microsoft .NET TextBox control on your user interface. The .NET TextBox control is a standard control in Windows Forms. You may drag and drop the TextBox from the Visual Studio Toolbox onto your Form. If you want to enter the text on the chart, please put the TextBox on the chart.
For creating image maps and track mouse events on it, please refer to my response to your other enquiry:
http://www.chartdir.com/forum/download_thread.php?site=chartdir&bn=chartdir_general&thread=1367583210#N1368037528
For the "rectangular box containing some data in it", I am not sure what type of rectangular box you would like to add. You can put a TextBox control (or another other control) on the plot area. As your code specifies the position of the plot area, your code should already know where to put the control and the resize the control to fit the plot area.
Another method is to add a ChartDirector TextBox (which is not a control, but just displays text) to the plot area using BaseChart.addText. My response to your other enquiry contains an example on how to use BaseChart.addText.
There are also some "Programmable Track Cursor" sample code that demonstrates some dynamic legend with data on top of the plot area. You may look up for "Track Line with Legend (Windows)" from the ChartDirector documentation index.
To avoid the control or TextBox from overlapping with the chart lines, you may put the control or TextBox just outside the plot area (like in the "Track Line with Legend (Windows)" sample code), or you may reserve some space without the plot area for the control or TextBox (using Axis.setMargin). There is an example "Multi-Bar Chart" which uses Axis.setMargin to reserves some space in the plot area for the legend box.
A chart by default has no title. If there is a title, it must be because the charting code adds the title. To remove the title from a chart, please remove the line of charting code that adds the title to the chart.
Hope this can help.
Regards
Peter Kwan |
Re: Entering some text on the plot |
Posted by John on May-09-2013 17:51 |
|
Hi Peter Kwan,
Thanks for your reply.
I created a chartdirector textbox on the plot area and an image map to it.
Now, user should be able to interactively move or drag the textbox and place at someother place on the plot area.
How can i do this ?
Thanks,
John. |
Re: Entering some text on the plot |
Posted by Peter Kwan on May-10-2013 02:42 |
|
Hi John,
If you want to have some user editable text and draggable text, I suggest you use a standard .NET TextBox (the one included in Visual Studio). You can put the text anywhere you like, such as on the plot area (just move the textbox either manually or programmatically so that it is on the plot area). You can configure the .NET TextBox to have no border, so it looks just like it is part of the chart.
You can then use the mouse events of the TextBox to move it. (Remember the coordinates in MouseDown, then you can compute the amount of movement in the MouseMove event and move the TextBox accordinng.)
Hope this can help.
Regards
Peter Kwan |
|