Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net
 SPC Control Chart Tools for .Net
 zoom

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
maxonlibero Posted - 14 Dec 2008 : 15:29:54
Hello,
I'm using in VB2005 an Individual Range chart with time axis.
Since my data sometime are rarefy and sometimes are very close I need a quick way to perform a zoom of a particular time range.
Is there a simple way?
or at least a way that clicking on the chart I can get the date time of the click.
Thanks
Max
5   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 30 Aug 2009 : 11:39:07
We are not sure of the context of your question. This is a thread about zooming the SPC charts. Zooming does not select an individual point or subgroup, it just changes the range of the x- and y-scales. Are you talking about zooming, or something more analogous to data tooltips, where an individual point is selected.
fanyorn Posted - 30 Aug 2009 : 10:26:44
By the way, it seems that there is no means to get the subgroup point's index by MouseListener when it was clicked on the chart,right?

Thanks.
quinncurtis Posted - 29 Dec 2008 : 10:37:51
While we did not design the SPC Chart routines with zooming in mind, you can implement zooming, using ChartZoom routines described in the QCChart2D manual.

Read the chapter on zooming in the QCChart2D manual, and run and study the ZoomExamples example program in the QCChart2D examples.

You can add a zoom with stack class to your main TimeVariableControlChart derived class:

c#

public class SPCApplicationUserControl1 : com.quinncurtis.spcchartnet.SPCTimeVariableControlChart
{
   private class ZoomWithStack : ChartZoom
   {
       public ZoomWithStack(ChartView component, PhysicalCoordinates transform, bool brescale)
           : base(component, transform, brescale)
         {
         }
       public override void OnMouseDown(MouseEventArgs mouseevent)
       {
           if ((mouseevent.Button & MouseButtons.Right) != 0)
               this.PopZoomStack();
           else
               base.OnMouseDown(mouseevent);
       }
   }
   .
   .
   .



VB
Public Class SPCApplicationUserControl1
    Inherits com.quinncurtis.spcchartnet.SPCTimeVariableControlChart

  Private Class ZoomWithStack
    Inherits ChartZoom

    Public Sub New(ByVal component As ChartView, ByVal transform As PhysicalCoordinates, ByVal brescale As Boolean)
      MyBase.New(component, transform, brescale)
    End Sub 'New

    Public Overrides Sub OnMouseDown(ByVal mouseevent As MouseEventArgs)
       If (mouseevent.Button And System.Windows.Forms.MouseButtons.Right) <> 0 Then
           Me.PopZoomStack()
       Else
           MyBase.OnMouseDown(mouseevent)
       End If
    End Sub 'OnMouseDown
  End Class 'ZoomWithStack


Instantiate the ZoomWithStack class at the bottom of the InitializeChart inititialization section.

c#

.
   .
   .
   this.AutoScalePrimaryChartYRange();
   this.AutoScaleSecondaryChartYRange();
   this.RebuildChartUsingCurrentData();

   // Add this code for zooming

   ZoomWithStack zoomObj = new ZoomWithStack(this, this.PrimaryChart.PPhysTransform1, true);
   zoomObj.SetButtonMask(MouseButtons.Left);
   zoomObj.SetZoomYEnable(true);
   zoomObj.SetZoomXEnable(true);
   zoomObj.SetZoomXRoundMode(ChartObj.AUTOAXES_FAR);
   zoomObj.SetZoomYRoundMode(ChartObj.AUTOAXES_FAR);
   zoomObj.SetEnable(true);
   zoomObj.SetZoomStackEnable(true);
   this.SetCurrentMouseListener(zoomObj);

}


VB

.
   .
   Me.AutoScalePrimaryChartYRange()
   Me.AutoScaleSecondaryChartYRange()
   Me.RebuildChartUsingCurrentData()

   ' Add this code for zooming

  Dim zoomObj As New ZoomWithStack(Me, Me.PrimaryChart.PPhysTransform1, True)
  zoomObj.SetButtonMask(System.Windows.Forms.MouseButtons.Left)
  zoomObj.SetZoomYEnable(True)
  zoomObj.SetZoomXEnable(True)
  zoomObj.SetZoomXRoundMode(ChartObj.AUTOAXES_FAR)
  zoomObj.SetZoomYRoundMode(ChartObj.AUTOAXES_FAR)
  zoomObj.SetEnable(True)
  zoomObj.SetZoomStackEnable(True)
   ' set range limits to 0.01, 0.01
  zoomObj.SetZoomRangeLimitsRatio(New Dimension(0.01, 0.01))
  Me.SetCurrentMouseListener(zoomObj)


End Sub 'InitializeChart


It will only work for one chart at a time (PrimaryChart or SecondaryChart).

You can download the complete c# file here: http://quinn-curtis.com/downloadsoftware/examplecode/SPCApplicationWithZoom.txt . You can RENAME the file SPCApplicationUserControl1 and replace the file of the existing name in the SPCApplication1 example program.
maxonlibero Posted - 27 Dec 2008 : 17:54:53
First of all thank you for your reply.
In my case I have to display some laboratory tests within a particular time window (ex: from 6 April to 14 July).
I can have hundreds of tests not equally spaced (ex: some days the lab. is closed or for some reason in a particular day the guys do only few tests).
I know that should be used a SPCBatchVariableControlChart (and I'm giving also this option adding as much possible information in the data tooltip) but to be able to visualize within a day when a test has been done would be appreciated, infact the same test made in the morning could be give different result if done in the afternoon.
So the customer request was to be able starting from a range of days going in details using zoom.
Finally answering to your questions: I'm not using the table, usually I have 200 - 300 data points and I have clear the difference between SPCBatchVariableControlChart and SPCTimeVariableControlChart.
Thank you for your support.
Max
quinncurtis Posted - 14 Dec 2008 : 17:56:59
We don't understand why you would need to zoom one of our variable control charts. While zooming is part of our general purpose charting library QCChart2D, this capability was not extended to the interface of the SPC software. Are you not using the tables, and plotting many more data points than our example progams ? How many?

A data tooltip for the charts is on by default. If you click on a data point you should see the time stamp for the data point and the data value. See our Individual Range example programs. Are you saying this is not working for you ?

If your data is not equally spaced with respect to time, you should be using the SPCBatchVariableControlChart, not the SPCTimeVariableControlChart. That way adjacent samples far apart in time will still be close to one another when charted. Are you clear as to the difference between the two?

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07