Microsoft Developer Network > 포럼 홈 > Chart Controls for .NET Framework > Synchronization Of different Vertically alligned X-axes
질문하기질문하기
 

제안된 답변Synchronization Of different Vertically alligned X-axes

  • 2009년 6월 26일 금요일 오전 5:13srazreddy 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    hello,

    In my application I created multiple ChartAreas with corresponding different Series.

    These all ChartAreas alligned vertically& style is like this

    m_chart.ChartAreas[2 * (nSeriesCount)].AlignmentOrientation =

    AreaAlignmentOrientations.Vertical;

    m_chart.ChartAreas[2 * (nSeriesCount)].AlignmentStyle =

     

    AreaAlignmentStyles.AxesView|AreaAlignmentStyles.PlotPosition;


    and I gave the X-axis Maximum& Minimum to all x-axes is same.

    Here  while Zooming Operation the Two vertically alligned axes are  showing x-axes Labels at different places .
    how can I show together X-axes labels,but some times synchronizing perfectly with same settings  ,some times not
    is it beacause of SelectionRange Of ChartArea or LabelInterval/labelIntervelType..?

    I tried above cases ,still I did get the solution

    Regards,
    Sraz

    • 편집됨srazreddy 2009년 6월 26일 금요일 오전 6:32
    •  

모든 응답

  • 2009년 6월 26일 금요일 오후 4:56Nader Nashed MSFTMSFT사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     제안된 답변

    Try to set the Axis.Interval to the same value on both chart areas

  • 2009년 7월 3일 금요일 오전 5:39srazreddy 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    yes,
    I set the same for two chartAreas, still its not syncronising
  • 2009년 7월 11일 토요일 오후 7:19Alex GorevMSFT, 소유자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Can you serialize your chart into XML file using Chart.serializer.Save and post it in the thread? Try to remove all unrelated settings.

    Alex.
    http://blogs.msdn.com/alexgor
  • 2009년 7월 23일 목요일 오전 9:53srazreddy 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     코드 있음
    Hi ,alex

    Here Iam uploading my XML file.
    In my appllication There are two(or more) ChartAreas,and these X-axes labels are syncronizing perfectly when it in complete Zoomout position(Zoom Reset state).
    But when Iam doing Zoom operation ,the scrollBar Enabling is file ,displaying X-lables are fine Not syncronising .
    Please give what i need to set more.

    - <Chart Size="683, 626">
    - <Series>
    - <Series Name="Series1" Legend="Legend1" XValueType="Time" YValueType="Double" ChartArea="ChartArea2">
    - <Points>
      <DataPoint XValue="40016.71037922454" YValues="38" /> 
      <DataPoint XValue="40016.710384467595" YValues="38" /> 
      <DataPoint XValue="40016.710396041664" YValues="114" /> 
      <DataPoint XValue="40016.710407615741" YValues="2" /> 
      <DataPoint XValue="40016.710587557871" YValues="176" /> 
      <DataPoint XValue="40016.710602928244" YValues="117" /> 
      <DataPoint XValue="40016.710610706017" YValues="117" /> 
      <DataPoint XValue="40016.710622280094" YValues="153" /> 
      </Points>
      </Series>
    - <Series Name="Series3" Legend="Legend1" XValueType="Time" YValueType="Double" ChartArea="ChartArea3">
    - <Points>
      <DataPoint XValue="40016.710587557871" YValues="0" /> 
      <DataPoint XValue="40016.710602928244" YValues="24393" /> 
      <DataPoint XValue="40016.710610706017" YValues="24393" /> 
      <DataPoint XValue="40016.710622280094" YValues="24084" /> 
      </Points>
      </Series>
      </Series>
    - <Legends>
      <Legend Name="Legend1" /> 
      </Legends>
    - <ChartAreas>
    - <ChartArea AlignWithChartArea="ChartArea3" AlignmentStyle="PlotPosition, AxesView" BackColor="Transparent" Name="ChartArea2">
      <CursorX IsUserEnabled="True" IsUserSelectionEnabled="True" Interval="0" IntervalType="Seconds" /> 
    - <AxisY>
      <LabelStyle ForeColor="Red" /> 
      </AxisY>
    - <AxisX IntervalType="Seconds" Maximum="40016.71064542824" Minimum="40016.709927835647">
      <LabelStyle Format="HH:mm:ss tt" /> 
      <ScaleView Position="40016.710275748388" Size="0.00013316759577719495" SizeType="Number" MinSize="0" MinSizeType="Seconds" SmallScrollMinSize="0" SmallScrollMinSizeType="Seconds" /> 
      <ScrollBar ButtonColor="LightBlue" BackColor="AliceBlue" /> 
      </AxisX>
      <Position X="5" Y="5" Width="80" Height="80" Auto="False" /> 
      <InnerPlotPosition X="5" Y="5" Width="80" Height="80" Auto="False" /> 
      </ChartArea>
    - <ChartArea AlignWithChartArea="ChartArea2" AlignmentStyle="PlotPosition, AxesView" BackColor="Transparent" Name="ChartArea3">
      <CursorX Position="40016.710408915984" IsUserEnabled="True" IsUserSelectionEnabled="True" Interval="0" IntervalType="Seconds" /> 
    - <AxisY>
      <LabelStyle ForeColor="LawnGreen" /> 
      </AxisY>
    - <AxisX IntervalType="Seconds" Maximum="40016.71064542824" Minimum="40016.709927835647">
      <LabelStyle Format="HH:mm:ss tt" /> 
      <ScaleView Position="40016.710275748388" Size="0.00013316759577719495" SizeType="Number" MinSize="0" MinSizeType="Seconds" SmallScrollMinSize="0" SmallScrollMinSizeType="Seconds" /> 
      <ScrollBar ButtonColor="LightBlue" BackColor="AliceBlue" /> 
      </AxisX>
      <Position X="5" Y="5" Width="80" Height="80" Auto="False" /> 
      <InnerPlotPosition X="5" Y="5" Width="80" Height="80" Auto="False" /> 
      </ChartArea>
      </ChartAreas>
      </Chart>
    
    Thanks& Regards
    sraz