Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net
 SPC Control Chart Tools for .Net
 Pareto chart Data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

emersonlin

Taiwan
5 Posts

Posted - 22 Jan 2015 :  23:17:59  Show Profile  Reply with Quote
How to know which bar on Pareto Chart the mouse clicked ,and the Data on it,include Yaxis's value and Xaxis's label value?
thanks.

quinncurtis

1586 Posts

Posted - 23 Jan 2015 :  09:27:00  Show Profile  Reply with Quote
You can used code similar to below, based on the QCSPCChart for WPF ParetoDiagram example program, (file Windows.xaml.cs) to install a mouse up event handler, and then to query the ParetoChart tooltip object for the data values.


public Window1()
{
     InitializeComponent();
     pc = new ParetoPlot(spcChart1);
     spcChart1.MouseUp +=new MouseButtonEventHandler(spcChart1_MouseUp);
     spcChart1.PreferredSize = new Size(600, 400);
}

private void spcChart1_MouseUp(Object sender, MouseButtonEventArgs e)
{
     NearestPointData npd = spcChart1.Datatooltip.GetNearestPoint();
     int barindex = npd.NearestPointIndex;
     double barYvalue = npd.NearestPoint.Y;
     double barXvalue = npd.NearestPoint.X;
     string[] labelstrings = spcChart1.XAxisLab.GetAxisLabelsStrings();
     string labelstring = labelstrings[barindex];

}
Go to Top of Page

emersonlin

Taiwan
5 Posts

Posted - 26 Jan 2015 :  05:20:53  Show Profile  Reply with Quote
ok,I resolve the problem,thanks a lot!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07