Line graph uses internally Polyline Silverlight element with attached Plot.Points property. Line graph adds Plot methods, Description property and legend support to existing Polyline functionality; 是在Polyline(SL内置)的基础上添加了Plot方法, Description(描述)和legend(图例) ——D3Overview
///<summary> /// Gets or sets line graph points. ///</summary> public PointCollection Points { get { return (PointCollection)base.GetValue(LineGraph.PointsProperty); } set { base.SetValue(LineGraph.PointsProperty, value); } }
}
变换
与wpf版本中类似 Each plot requires a coordinate transform, actually a composition of data transform and plot transform.
Data transform for a given data element d computes its vertical or horizontal coordinate x or y on plot plane
Plot transform is a transform from plot coordinates to screen coordinates. Plot transform is always a composition of Translate and Scale transforms, so it is independent along each axis and defined by four numbers xscale, yscale, xoffset, yoffset
PlotBase是Plot最重要的类 PlotBase is a Silverlight panel that facilitates several tasks:
Coordinate transformation between screen and user data
AutoFit mode support
Management of plot composition and coordinate transforms synchronization
Plot, Figure和Chart
LineGraph是Plot
Figure class is a panel derived from PlotBase and provides special layout options that are often found in charts. It provides attached property Placement that allows to place child elements in center, left, top, right and bottom slots
Chart element is a prepackaged(预包装) figure with axis, grid lines, legend and title
近期评论