Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Server.v4.4 Assembly / Xceed.Chart.Server Namespace / ChartServerControl Class / ServerConfiguration Property
Example


    ServerConfiguration Property
    Retrieves the current server configuration of the control.
    Syntax
    'Declaration
     
    <DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)>
    <CategoryAttribute("Xceed Chart for ASP.NET")>
    <DescriptionAttribute("Retrieves the current server configuration of the control.")>
    <BrowsableAttribute(False)>
    Public Property ServerConfiguration As ServerConfiguration
     
    'Usage
     
    Dim instance As ChartServerControl
    Dim value As ServerConfiguration
     
    instance.ServerConfiguration = value
     
    value = instance.ServerConfiguration
    Remarks
    With the help the ServerConfiguration object you can change the server configuration of the chart at runtime. For example the location of the temp directory, the default browser response and other settings.
    Example
    The following lines of code instruct the chart to generate a PNG image.
    ' override any settings we may have inherited from the web config file
    ChartServerControl1.ServerConfiguration.Responses.Clear()
    Dim response As Response =  New ImageResponse() 
     
    Dim jpegDescription As JPEGDescription =  New JPEGDescription() 
     
    jpegDescription.Quality = 100
    response.ImageDescription = jpegDescription
     
    ChartServerControl1.ServerConfiguration.DefaultResponse = response
    // override any settings we may have inherited from the web config file
                ChartServerControl1.ServerConfiguration.Responses.Clear();
                Response response = new ImageResponse();
    
                JPEGDescription jpegDescription = new JPEGDescription();
    
                jpegDescription.Quality = 100;
                response.ImageDescription = jpegDescription;
    
                ChartServerControl1.ServerConfiguration.DefaultResponse = response;
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also