flexchart 的annotation功能中,当为DataCoordinate的时候,location是pointf类型的,但是我x轴坐标是时间,值是double类型的,当我添加annotation的时候,double到float的转换会使得时间上的差异比较大。不知道有没有什么解决方案呢?- rectangle3 = new C1.Win.Chart.Annotation.Rectangle("DataCoordinate3", 10, 10)
- {
- Location = new PointF(fx, y),
- Attachment = AnnotationAttachment.DataCoordinate,
- Position = AnnotationPosition.Bottom,
- TooltipText = "This is a rectangle annotation\r\nLocation: { x:37, y:30 }\r\nAttachment: DataCoordinate"
- };
- rectangle3.ContentStyle.StrokeColor = Color.Black;
- rectangle3.ContentStyle.Font = new System.Drawing.Font(FontFamily.GenericSansSerif, 10, FontStyle.Bold);
- rectangle3.Style.FillColor = Color.FromArgb(200, Color.SeaGreen);
- rectangle3.Style.StrokeColor = Color.DarkSlateBlue;
- rectangle3.Style.StrokeWidth = 2;
- layer.Annotations.Add(rectangle3);
复制代码
|
|