Esempio n. 1
0
        private void DrawHeatMap()
        {
            int GridSize = m_Model.ResultSize;

            m_ComparisonHeatmap.Clear();
            m_ComparisonHeatmap.Add((scpl.IDrawable) new scpl.Grid()
            {
                HorizontalGridType = scpl.Grid.GridType.Fine,
                VerticalGridType   = scpl.Grid.GridType.Fine
            });
            double[,] data       = new double[GridSize, GridSize];
            string[,] cellLabels = new string[GridSize, GridSize];
            for (int GeIndex1 = 0; GeIndex1 < GridSize; ++GeIndex1)
            {
                for (int GeIndex2 = 0; GeIndex2 < GridSize; ++GeIndex2)
                {
                    data[GeIndex1, GeIndex2]       = Convert.ToDouble(this.CalculateDifferences(m_Model.BestSoFar.Items[GeIndex1], m_Model.BestSoFar.Items[GeIndex2]));
                    cellLabels[GeIndex1, GeIndex2] = m_Model.BestSoFar.Items[GeIndex1].Alias + " vs " + m_Model.BestSoFar.Items[GeIndex2].Alias + " " + Convert.ToInt32(data[GeIndex1, GeIndex2]).ToString() + " differences";
                }
            }
            m_ComparisonHeatmap.Add((scpl.IDrawable) new scpl.ImagePlot(data, cellLabels, 1.0, 1.0, 1.0, 1.0)
            {
                Gradient = (scpl.IGradient) new scpl.LinearGradient(Color.Yellow, Color.Blue)
            });
            m_ComparisonHeatmap.Refresh();
        }
        /// <summary>
        /// Initializes the control with a set of items.
        /// </summary>
        public void Initialize(TsCHdaServer server, TsCHdaItemValueCollection values)
        {
            mServer_ = server;
            mItem_   = values;

            valuesLv_.Items.Clear();
            plotCtrl_.Clear();

            if (values != null)
            {
                // add item values to list.
                foreach (TsCHdaItemValue value in values)
                {
                    AddListItem(value, -1);
                }

                // adjust the list view columns to fit the data.
                AdjustColumns();
            }

            // update control state.
            SetState(graphMi_.Checked);
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes the control with a set of items.
        /// </summary>
        public void Initialize(TsCHdaServer server, TsCHdaItemValueCollection values)
        {
            m_server = server;
            m_item   = values;

            ValuesLV.Items.Clear();
            PlotCTRL.Clear();

            if (values != null)
            {
                // add item values to list.
                foreach (TsCHdaItemValue value in values)
                {
                    AddListItem(value, -1);
                }

                // adjust the list view columns to fit the data.
                AdjustColumns();
            }

            // update control state.
            SetState(GraphMI.Checked);
        }