in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

how to pan in a chart

Last post 05-29-2008 11:36 AM by C1_GregL. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-16-2008 10:39 PM

    how to pan in a chart

    greetings:

    I found an example for zooming in on chart.

    does anyone have the code for panning a 2d chart?

    thanks

    chris 

     

  • 05-29-2008 11:36 AM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 500

    Re: how to pan in a chart

    Under the Interaction property you set Enabled to true.  Then use the Actions collection to set which axes and buttons are used for panning.  Here panning is called "Translate".  (zooming is just "Zoom").

    In code this would look like

    1. C1Chart1.Interaction.Enabled = True
    2. C1Chart1.Interaction.Actions("Translate").Axis = C1.Win.C1Chart.AxisFlagEnum.AxisX
    3. C1Chart1.Interaction.Actions("Translate").MouseButton = Windows.Forms.MouseButtons.Left 'default
    4. C1Chart1.Interaction.Actions("Translate").Modifier = Keys.Shift 'default

     

    Greg

    Filed under: ,
Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.