Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 Floating bar
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

FPHealthcare

22 Posts

Posted - 15 Nov 2007 :  00:51:39  Show Profile  Reply with Quote
I try to draw a floating bar with plot labels on the top of each bar.
Can I custom the value which I want to show on the plot label for each bar? Just like belowing sample:

_________20%_____________35%
====___________====______________
===|___________|==|______________|
=|_________________________________|

Thanks.

quinncurtis

1164 Posts

Posted - 15 Nov 2007 :  07:34:46  Show Profile  Reply with Quote
Thre is no automatic way of centering custom labels like you show. If you want to place custom numeric labels atop the bars, use the NumericLabel class with the PERCENTFORMAT number format. You can position the labels above the bars using the graphs scaled (physical)coordinates. It's up to you to calculate the physical coordinate position of the label, based on the data values.
Go to Top of Page

FPHealthcare

22 Posts

Posted - 15 Nov 2007 :  14:47:04  Show Profile  Reply with Quote
Is that possible I can set the value of plot label manualy? We dont want to show the value which automatically generated based on the Y Axis. Thanks.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 15 Nov 2007 :  15:06:10  Show Profile  Reply with Quote
You should be creating independent NumericLabel objects. They will have no tie-in to the bars in the graph. It is up to you to position the NumericLabel objects above the floating barrs.

You can use the NumericLabel constructor that specifies an intial value, or your can set the value of the label using the NumericLabel.NumericValue property.

If you don't specify a value, a numeric label will default to 0.0.

You must create a new NumericLabel object for each bar you want to label.

double x = 20;
double y = 10;
double labelvalue = 0.25;

// set the value in the constructor
NumericLabel barlabel = new NumericLabel(pTransform1, labelfont,
   labelvalue , x, y, ChartObj.PHYS_POS, ChartObj.PERCENTFORMAT,1);
chartVu.AddChartObject(barlabel );

// or set the value using the NumericValue property
labelvalue = 0.35;
barlabel.NumericValue = labelvalue ;

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07