zhangzy0193 / visifire

Automatically exported from code.google.com/p/visifire
1 stars 4 forks source link

Bar Charts do not work properly with OnZoom event #241

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
<StackPanel>

     <vc:Chart Name="MyChart1"
xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts"
Theme="Theme1" Width="500" Height="240" ZoomingEnabled="true">

           <vc:Chart.AxesX>
               <vc:Axis/>
           </vc:Chart.AxesX>

            <vc:Chart.Series>
               <vc:DataSeries RenderAs="Bar">
                   <vc:DataSeries.DataPoints>
                       <vc:DataPoint AxisXLabel="ABC1" YValue="25"/>
                       <vc:DataPoint AxisXLabel="ABC2" YValue="35"/>
                       <vc:DataPoint AxisXLabel="ABC3" YValue="28"/>
                       <vc:DataPoint AxisXLabel="ABC4" YValue="75"/>
                       <vc:DataPoint AxisXLabel="ABC5" YValue="17"/>
                       <vc:DataPoint AxisXLabel="ABC6" YValue="50"/>
                       <vc:DataPoint AxisXLabel="ABC7" YValue="43"/>
                       <vc:DataPoint AxisXLabel="ABC8" YValue="89"/>
                       <vc:DataPoint AxisXLabel="ABC9" YValue="32"/>
                       <vc:DataPoint AxisXLabel="ABC10" YValue="87"/>
                       <vc:DataPoint AxisXLabel="ABC11" YValue="00"/>
                       <vc:DataPoint AxisXLabel="ABC12" YValue="28"/>
                       <vc:DataPoint AxisXLabel="ABC13" YValue="98"/>
                       <vc:DataPoint AxisXLabel="ABC14" YValue="62"/>
                       <vc:DataPoint AxisXLabel="ABC15" YValue="25"/>
                       <vc:DataPoint AxisXLabel="ABC16" YValue="83"/>
                       <vc:DataPoint AxisXLabel="ABC17" YValue="25"/>
                       <vc:DataPoint AxisXLabel="ABC18" YValue="73"/>
                       <vc:DataPoint AxisXLabel="ABC19" YValue="48"/>
                       <vc:DataPoint AxisXLabel="ABC20" YValue="57"/>
                   </vc:DataSeries.DataPoints>
               </vc:DataSeries>
           </vc:Chart.Series>
     </vc:Chart>

     <vc:Chart Name="MyChart2"
xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts"
Theme="Theme1" Width="500" Height="240" ZoomingEnabled="true">

            <vc:Chart.AxesX>
               <vc:Axis />
           </vc:Chart.AxesX>

           <vc:Chart.Series>
               <vc:DataSeries RenderAs="Bar">
                   <vc:DataSeries.DataPoints>
                       <vc:DataPoint AxisXLabel="ABC1" YValue="25"/>
                       <vc:DataPoint AxisXLabel="ABC2" YValue="35"/>
                       <vc:DataPoint AxisXLabel="ABC3" YValue="28"/>
                       <vc:DataPoint AxisXLabel="ABC4" YValue="75"/>
                       <vc:DataPoint AxisXLabel="ABC5" YValue="17"/>
                       <vc:DataPoint AxisXLabel="ABC6" YValue="50"/>
                       <vc:DataPoint AxisXLabel="ABC7" YValue="43"/>
                       <vc:DataPoint AxisXLabel="ABC8" YValue="89"/>
                       <vc:DataPoint AxisXLabel="ABC9" YValue="32"/>
                       <vc:DataPoint AxisXLabel="ABC10" YValue="87"/>
                       <vc:DataPoint AxisXLabel="ABC11" YValue="00"/>
                       <vc:DataPoint AxisXLabel="ABC12" YValue="28"/>
                       <vc:DataPoint AxisXLabel="ABC13" YValue="98"/>
                       <vc:DataPoint AxisXLabel="ABC14" YValue="62"/>
                       <vc:DataPoint AxisXLabel="ABC15" YValue="25"/>
                       <vc:DataPoint AxisXLabel="ABC16" YValue="83"/>
                       <vc:DataPoint AxisXLabel="ABC17" YValue="25"/>
                       <vc:DataPoint AxisXLabel="ABC18" YValue="73"/>
                       <vc:DataPoint AxisXLabel="ABC19" YValue="48"/>
                       <vc:DataPoint AxisXLabel="ABC20" YValue="57"/>
                   </vc:DataSeries.DataPoints>
               </vc:DataSeries>
           </vc:Chart.Series>
      </vc:Chart>
</StackPanel>

Code Behind

public Page()
{
   InitializeComponent();

   MyChart1.AxesX[0].OnZoom += new
EventHandler<AxisZoomEventArgs>(Page_OnZoom);
}

Event Handler

void Page_OnZoom(object sender, AxisZoomEventArgs e)

{
   MyChart2.AxesX[0].Zoom(e.MinValue, e.MaxValue);
}

Original issue reported on code.google.com by sheetalk...@gmail.com on 10 May 2010 at 9:53

GoogleCodeExporter commented 9 years ago

Original comment by somnathpanja@gmail.com on 3 Aug 2010 at 6:11

GoogleCodeExporter commented 9 years ago

Original comment by somnathpanja@gmail.com on 18 Aug 2010 at 7:44