Spread Windows Forms 15.0
Spread Windows Forms 15.0 Product Documentation / Developer's Guide / Chart Control / Creating Charts / Connecting to Data / Using an UnBound Data Source
In This Topic
    Using an UnBound Data Source
    In This Topic

    You can use the chart in an unbound state without binding it to the data source. In such case, add double values to the chart control without using a datasource.

    Example

    The following example demonstrates adding unbound data to the control.

    C#
    Copy Code
    BarSeries series = new BarSeries();
    series.Values.Add(2.0);
    series.Values.Add(4.0);
    series.Values.Add(3.0);
    series.Values.Add(5.0);
    
    Visual Basic
    Copy Code
    Dim series As New BarSeries()
    series.Values.Add(2.0)
    series.Values.Add(4.0)
    series.Values.Add(3.0)
    series.Values.Add(5.0)
    

    Using Chart Designer

    1. Run the Chart Designer.
    2. Select the target Chart Model from the tree menu on the left.
    3. Open the Plot Area Collection Editor from Plot Area in the Other section of the property list on the right.
    4.  Open the Series Collection Editor from Series in the Data section.
    5. Open the Value Collection Editor from Values in the Data section.
    6. Set the values as required.
    For information on starting Chart Designer, refer to Chart Designer in the SPREAD Designer Guide.
    See Also