Possible Issue with Scatter Plots

Jun 30, 2013 at 6:05 PM
Hi,

I have created a Scatter Plot on a page. Unfortunately, all plots that I render give me line plots. The item dropped on web form is

<highchart:ScatterChart id="hcPlot" runat="server" Width="1000" Height="550"/>

I set the properties in the code behind for the form with the following code
    public object[] XAxisValues
    {
        set
        {
            hcPlot.Appearance.defaultSeriesType = "scatter"; // Added this to force scatter
            hcPlot.XAxis.RemoveAll(item => item.id == "Values");
            hcPlot.XAxis.Add(new XAxisItem
            {
                categories = value,
                id = "Values",
                type = AxisDataType.linear 
            });
        }
    }
And also have a public method to add Y plots
    public void AddYAxisValues(string legend, object[] value, string plotType = "scatter")
    {
            series.Add(new Serie
                {
                    name = legend, 
                    data = value,
                    type = PlotType(plotType) 
                });
    }

    private RenderType PlotType(string type)
    {
        switch (type)
        {
            case "line":
                return RenderType.line;
            case "scatter":
                return RenderType.scatter;
            case "spline":
                return RenderType.spline;
        }
        return RenderType.scatter;
    }
The problem that I get is that the final rendering is always of type line. I actually do need a scatter plot here - line plots equally space all x axis values, scatter plots do not. I know it is rendering a line because the generated Highchart JSON in the html contains
chartFeaturedContent_ucScatterPlot_hcPlot = new Highcharts.Chart({    
chart: {"renderTo":"FeaturedContent_ucScatterPlot_hcPlot","defaultSeriesType":"line"},
Is this an error or am I missing something simple?