Microsoft Developer Network > Página Inicial dos Fóruns > Chart Controls for .NET Framework > Synchronization Of different Vertically alligned X-axes
Fazer uma PerguntaFazer uma Pergunta
 

Resposta PropostaSynchronization Of different Vertically alligned X-axes

  • sexta-feira, 26 de junho de 2009 5:13srazreddy Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    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

    • Editadosrazreddy sexta-feira, 26 de junho de 2009 6:32
    •  

Todas as Respostas

  • sexta-feira, 26 de junho de 2009 16:56Nader Nashed MSFTMSFTMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Resposta Proposta

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

  • sexta-feira, 3 de julho de 2009 5:39srazreddy Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    yes,
    I set the same for two chartAreas, still its not syncronising
  • sábado, 11 de julho de 2009 19:19Alex GorevMSFT, ProprietárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    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
  • quinta-feira, 23 de julho de 2009 9:53srazreddy Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Contém Código
    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