Windows forms chart samples




















Bar ; series. Bar series. Add 2 , 4 ' Add the series to the chart series collection. StackingBar ; series. StackingBar ; series2. Add 0 , 2 ; series2. Add 1 , 1 ; series2. Add series ; this. Add series2 ;. StackingBar series. StackingBar series2. Add 0 , 2 series2. Add 1 , 1 series2. Add 2 , 1 ' Add the series to the chart series collection. Add series Me. Add series2. StackingBar ; series1. Add 0 , Add 1 , Add 2 , Add 3 , Add 4 , Add 5 , StackingBar series1. Gantt ; series. Gantt series.

Add 0 , 1 , 5 series. Add 1 , 3 , 7 series. Histogram ; series. Name ; series. Add 3 , ; series. Add 45 , ; series.

Add 23 , ;. Histogram series. Name series. Add 3 , series. Add 45 , series. Add 23 , Tornado ; series. Tornado ; series2. Tornado series. Add 1 , 0 , 48 series. Add 2 , 0 , 42 series. Add 3 , 0 , 27 series. Add 4 , 0 , 20 series. Add 5 , 0 , 9 ' Add the series to the chart series collection. Add series ' Create chart series and add data points into it.

Tornado series2. Add 1 , 0 , - 45 series2. Add 2 , 0 , - 39 series2. Add 3 , 0 , - 31 series2. Add 4 , 0 , - 20 series2. Column ; series. Column series. ColumnRange ; series. Add 0 , , ; series. Add 2 , , ; series. Add 4 , , ; series. ColumnRange series. Add 0 , , series. Add 2 , , series. Add 4 , , series. Name ' Add the series to the chart series collection. StackingColumn ; series. StackingColumn ; series2. StackingColumn series. StackingColumn series2. Add 2 , 1 'Add the series to the chart series collection.

StackingColumn ; series1. StackingColumn series1. Area ; series. Add 2 , 4 ; series. Add 2 , 4 series. Add 3 , 3 ' Add the series to the chart series collection. StackingArea ; series. StackingArea ; series2. StackingArea series. StackingArea series2. StackingArea ; series1. Add 1 , 20 ; series1.

Add 2 , 30 ; series1. Add 3 , 10 ; series1. Add 4 , 15 ; series1. Add 5 , 25 ; this. Add 1 , 20 ; series2. Add 2 , 10 ; series2. Add 3 , 50 ; series2. Add 4 , 15 ; series2. StackingArea ; series3. Add 1 , 20 ; series3. Add 2 , 40 ; series3. Add 3 , 10 ; series3. Add 4 , 5 ; series3. Add 5 , 20 ; this. Add series3 ;. StackingArea series1. Add 0 , 20 series1. Add 1 , 30 series1. Add 2 , 10 series1. Add 3 , 15 series1. Add 0 , 20 series2. Add 1 , 10 series2. Add 2 , 50 series2.

Add 3 , 15 series2. StackingArea series3. Add 0 , 20 series3. Add 1 , 40 series3. Add 2 , 10 series3. Add 3 , 5 series3. Add series3. StepArea ; series. Add 3 , 2 ; series. StepArea series. Add 3 , 2 series. Add 4 , 3 ' Add the series to the chart series collection. RangeArea ; series1. Add 0 , 18 , 50 ; series1. Add 1 , 20 , 49 ; series1. Add 2 , 18 , 52 ; series1. Add 3 , 20 , 50 ; series1. Add 5 , 21 , 51 ; series1. Add 6 , RangeArea series1. Add 0 , 18 , 50 series1.

Add 1 , 20 , 49 series1. Add 2 , 18 , 52 series1. Add 3 , 20 , 50 series1. Add 5 , 21 , 51 series1. Funnel ; series1. Funnel series1. Pyramid ; series1. Pyramid series1. Scatter ; series. Scatter series. Styles [ 0 ]. Red ; series. InvertedTriangle ; series. Styles [ 1 ]. Green ; series. Hexagon ; series. Styles [ 2 ]. Blue ; series. Cross ;. Styles 0. Red series. InvertedTriangle series. Styles 1. Green series.

Hexagon series. Styles 2. Blue series. Bubble ' The 2nd Y value represents the size of the shape. Add 0 , 1 , 7 series. Gets a value indicating whether the control is currently re-creating its handle. Gets or sets the window region associated with the control. This property is now obsolete.

Gets or sets a value indicating whether the control redraws itself when resized. Gets a value that determines the scaling of child controls.

Gets a value indicating whether the control should display focus rectangles. Gets or sets the site of the control. Gets or sets a flag that determines whether non-critical exceptions should be suppressed. Gets or sets the tab order of the control within its container. Gets or sets the object that contains data about the control. Gets or sets the text associated with this control. Gets or sets a value indicating whether the control and all its child controls are displayed. Gets or sets the width of the control.

BeginInvoke Action. BeginInvoke Delegate. BeginInvoke Delegate, Object[]. Brings the control to the front of the z-order. Contains Control. Retrieves a value indicating whether the specified control is a child of the control. Creates a new instance of the control collection for the control.

Creates a handle for the control. CreateObjRef Type. Inherited from MarshalByRefObject. Data binds a chart to the table, with one series created per unique value in a given column. DataBindTable IEnumerable. Automatically creates and binds series data to the specified data table. DefWndProc Message. Sends the specified message to the default window procedure. Destroys the handle associated with the control. Dispose Boolean.

Begins a drag-and-drop operation. DrawToBitmap Bitmap, Rectangle. Supports rendering to the specified bitmap. EndInvoke IAsyncResult. Equals Object. Determines whether the specified object is equal to the current object. Inherited from Object. Retrieves the form that the control is on. Sets input focus to the control. GetChildAtPoint Point. Retrieves the child control that is located at the specified coordinates.

Serves as the default hash function. GetNextControl Control, Boolean. Retrieves the next control forward or back in the tab order of child controls. GetPreferredSize Size. Retrieves the size of a rectangular area into which a control can be fitted. Retrieves the bounds within which the control is scaled. GetService Type. GetStyle ControlStyles. Retrieves the value of the specified control style bit for the control. Determines if the control is a top-level control. Conceals the control from the user.

HitTest Int32, Int HitTest Int32, Int32, Boolean. Obtains a lifetime service object to control the lifetime policy for this instance. Called after the control has been added to another container. Invalidate Boolean. Invalidate Rectangle. Invalidate Rectangle, Boolean. Invalidate Region.

Invalidate Region, Boolean. Invoke Action. Executes the specified delegate on the thread that owns the control's underlying window handle. Invoke Delegate. Invoke Delegate, Object[]. IsInputChar Char. Determines if a character is an input character that the control recognizes. IsInputKey Keys. LoadTemplate Stream. LoadTemplate String. LogicalToDeviceUnits Int LogicalToDeviceUnits Size. MemberwiseClone Boolean. NotifyInvalidate Rectangle.

OnClick EventArgs. OnCursorChanged EventArgs. OnDockChanged EventArgs. OnDoubleClick EventArgs. OnDragLeave EventArgs. OnEnabledChanged EventArgs. OnEnter EventArgs. OnFontChanged EventArgs. OnGotFocus EventArgs. OnHandleCreated EventArgs. OnHandleDestroyed EventArgs. OnInvalidated InvalidateEventArgs. OnLayout LayoutEventArgs.

OnLeave EventArgs. OnLocationChanged EventArgs. OnLostFocus EventArgs. OnMarginChanged EventArgs. OnMouseEnter EventArgs. OnMouseHover EventArgs. OnMouseLeave EventArgs. OnMove EventArgs. OnNotifyMessage Message. Notifies the control of Windows messages. OnPaddingChanged EventArgs. OnPaint PaintEventArgs. OnParentChanged EventArgs. OnPrint PaintEventArgs. OnRegionChanged EventArgs. OnResize EventArgs. OnSizeChanged EventArgs.

OnStyleChanged EventArgs. OnTextChanged EventArgs. OnValidated EventArgs. OnValidating CancelEventArgs. OnVisibleChanged EventArgs. Forces the control to apply layout logic to all its child controls.

PerformLayout Control, String. PointToClient Point. Computes the location of the specified screen point into client coordinates. PointToScreen Point. Computes the location of the specified client point into screen coordinates. PreProcessControlMessage Message. Preprocesses keyboard or input messages within the message loop before they are dispatched.

PreProcessMessage Message. ProcessCmdKey Message, Keys. Processes a command key. ProcessDialogChar Char. Processes a dialog character. ProcessDialogKey Keys. Processes a dialog key. ProcessKeyEventArgs Message. Processes a key message and generates the appropriate control events. ProcessKeyMessage Message. Processes a keyboard message. ProcessKeyPreview Message. Previews a keyboard message. ProcessMnemonic Char. Processes a mnemonic character. Raises the appropriate drag event. Raises the appropriate key event.

Raises the appropriate mouse event. Raises the appropriate paint event. Forces the re-creation of the handle for the control. RectangleToClient Rectangle. Computes the size and location of the specified screen rectangle in client coordinates. RectangleToScreen Rectangle. Computes the size and location of the specified client rectangle in screen coordinates.

Provides constants for rescaling the control when a DPI change occurs. Resets automatically calculated chart property values to "Auto". Resumes usual layout logic. ResumeLayout Boolean. Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests. RtlTranslateAlignment ContentAlignment.

RtlTranslateAlignment HorizontalAlignment. RtlTranslateContent ContentAlignment. RtlTranslateHorizontal HorizontalAlignment. SaveImage Stream, ImageFormat. SaveImage String, ImageFormat. Scale Single. Scales the control and any child controls. Scale Single, Single. Scales the entire control and any child controls.

Scale SizeF. Scales the control and all child controls by the specified scaling factor. Scales a logical bitmap value to it's equivalent device unit value when a DPI change occurs. Scales a control's location, size, padding and margin. ScaleCore Single, Single.

This method is not relevant for this class. Activates the control. Select Boolean, Boolean. Activates the next control. Sends the control to the back of the z-order. Sets the bounds of the control to the specified location and size. Sets the specified bounds of the control to the specified location and size. Performs the work of setting the specified bounds of this control. Sets the size of the client area of the control.

SetStyle ControlStyles, Boolean. SetTopLevel Boolean. Sets the control as the top-level control. SetVisibleCore Boolean. Sets the control to the specified visible state. Displays the control to the user. AddXY "Ajay" , "" ; chart1. AddXY "Ramesh" , "" ; chart1. AddXY "Ankit" , "" ; chart1.

AddXY "Gurmeet" , "" ; chart1. Use the following preceding procedure. Add these lines of code to Form1. Forms; using System. Data; using System. Fill ds ; chart1.

Add "Salary Chart" ; con. View All.



0コメント

  • 1000 / 1000