Design of the top chart curve on the PDA

xiaoxiao2021-03-06  78

Due to actual PDA applications, some curves are required, while existing controls cannot meet the requirements, so I have to try to design some class libraries to meet the current needs.

I. Basic demand:

Vector chart

Functional requirements:

● Title (background color, foreground color, font)

● Figure background color

● Coordinate point (display header, angle (0-360), color)

● Legend (whether it is displayed, color) // secondary attribute

● You can modify the color, angle, title, etc. of the coordinate point. (Identify index value)

Implementation:

Waveform map (XY figure)

Functional requirements:

● X-axis (font color, title value)

● Y axis (font color, title value)

● Title (background color, foreground color, font)

● Figure background color

● Curve series (curve 1, curve 2 ...)

● Curve: Add point (X-axis value, y-axis value), curve color

● Scale of XY axis: 0, max, intermediate scale

● Legend (color, display)

Implementation:

II. Class design and implementation

Class map UML representation: division 3

first part:

the second part:

the third part:

Mainly involved in several classes:

Chart class: chart inherited from system.windows.form.control

Linechart, VectorChart

Element Collection Class: BaseElementCollection Series Collection, Series can be dot, vector, etc.

Subclass Points, VectorCollection, LINSERIALS

Chart Elements Class: BaseElement associated with the collection class

Subclass Vector, Point, LINSERIAL

Problem: You cannot dynamically change the type of chart, such as switching between Vector and other chart types.

转载请注明原文地址:https://www.9cbs.com/read-121669.html

New Post(0)