コード例 #1
0
        //
        // ClickHotSpot event handler. In this demo, we just display the hot spot parameters in a pop up
        // dialog.
        //
        private void WPFChartViewer1_ClickHotSpot(object sender, WPFHotSpotEventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("w=" + Width + ". h=" + Height);
            var viewer = sender as WPFChartViewer;

            // We show the pop up dialog only when the mouse action is not in zoom-in or zoom-out mode.
            if ((viewer.MouseUsage != WinChartMouseUsage.ZoomIn) &&
                (viewer.MouseUsage != WinChartMouseUsage.ZoomOut))
            {
                new ParamViewer().Display(sender, e);
            }
        }
コード例 #2
0
        public void Display(object sender, WPFHotSpotEventArgs e)
        {
            // Add the name of the ChartViewer control that is being clicked
            dataGrid.Items.Add(new DictionaryEntry("source", (sender as WPFChartViewer).Name));

            // List out the parameters of the hot spot
            foreach (var key in e.AttrValues)
            {
                dataGrid.Items.Add(key);
            }

            // Display the form
            ShowDialog();
        }
コード例 #3
0
 /// <summary>
 /// Handler for the ClickHotSpot event, which occurs when the mouse clicks on
 /// a hot spot on the chart
 /// </summary>
 private void chartViewer_ClickHotSpot(object sender, WPFHotSpotEventArgs e)
 {
     // In this demo, just list out the information provided by ChartDirector about hot spot
     new ParamViewer().Display(sender, e);
 }