/// <summary>
    /// Initializes graph.
    /// </summary>
    private void InitializeGraph()
    {
        var data           = InitGraphColumns();
        var conversionName = String.IsNullOrEmpty(drpConversions.SelectedValue) ? ABTest.ABTestConversionConfiguration.ABTestConversions.Select(c => c.ConversionName).Join(";") : drpConversions.SelectedValue;

        object[] parameters =
        {
            ABTest.ABTestOpenFrom,
            GetFinishDate(),
            ABTest.ABTestName,
            conversionName,
            graphDataElem.SelectedActionName,
            ABTest.ABTestID,
            String.Empty,
            String.Empty,
            drpCountingMethodology.SelectedValue
        };

        var dataRow = data.Rows.Add(parameters);

        data.AcceptChanges();

        displayReport.Colors               = ABVariantColorAssigner.GetColors(ABTest);
        displayReport.LoadFormParameters   = false;
        displayReport.DisplayFilter        = false;
        displayReport.GraphImageWidth      = 100;
        displayReport.IgnoreWasInit        = true;
        displayReport.UseExternalReload    = true;
        displayReport.UseProgressIndicator = true;
        displayReport.SelectedInterval     = samplingElem.SelectedActionName;
        displayReport.ReportParameters     = dataRow;
        displayReport.ReportName           = "mvcabtest" + drpSuccessMetric.SelectedValue + "." + samplingElem.SelectedActionName + "report";
    }
Exemplo n.º 2
0
    /// <summary>
    /// Initializes graph.
    /// </summary>
    private void InitializeGraph()
    {
        DataTable data = new DataTable();

        data.Columns.Add("FromDate", typeof(DateTime));

        // Show graph data to the finish date or today if the test is still running
        data.Columns.Add("ToDate", typeof(DateTime));

        data.Columns.Add("TestName", typeof(string));

        // Set conversion name either to selected one, or to all conversions set in settings tab
        data.Columns.Add("ConversionName", typeof(string));
        data.Columns.Add("GraphType", typeof(string));
        data.Columns.Add("ABTestID", typeof(int));
        data.Columns.Add("VariationName", typeof(string));
        data.Columns.Add("ABTestCulture", typeof(string));
        data.Columns.Add("ConversionType", typeof(string));

        string conversionName = (string)(String.IsNullOrEmpty(drpConversions.Value as string) ? ABTest.ABTestConversions.Join(";") : drpConversions.Value);

        object[] parameters =
        {
            ABTest.ABTestOpenFrom,
            GetFinishDateOrToday(),
            ABTest.ABTestName,
            conversionName,
            graphDataElem.SelectedActionName,
            ABTest.ABTestID,
            string.Empty,
            drpCulture.Value,
            drpCountingMethodology.SelectedValue
        };

        data.Rows.Add(parameters);
        data.AcceptChanges();

        displayReport.Colors               = ABVariantColorAssigner.GetColors(ABTest);
        displayReport.LoadFormParameters   = false;
        displayReport.DisplayFilter        = false;
        displayReport.GraphImageWidth      = 100;
        displayReport.IgnoreWasInit        = true;
        displayReport.UseExternalReload    = true;
        displayReport.UseProgressIndicator = true;
        displayReport.SelectedInterval     = samplingElem.SelectedActionName;
        displayReport.ReportParameters     = data.Rows[0];
        displayReport.ReportName           = "abtest" + drpSuccessMetric.SelectedValue + "." + samplingElem.SelectedActionName + "report";
    }