Jump to content

 

Photo

Hiding right side scale in chart


  • Please log in to reply
4 replies to this topic

#1 shiva

shiva

    Newbie

  • Members
  • Pip
  • 9 posts
  • Gender:Male
  • Location:Mysore, India

Posted 02 April 2012 - 12:58 PM

Hi All.
I have plotted chart to show the savings of my company. In that I have 3 data series, last two are secondary. I need to hide/ remove right side scale in that chart. Please help me to do this. Please refer the image below. Red circled scale i want to remove.

Below is my xaml code
----------------------

<vc:Chart x:Name="SummaryChart" Grid.Column="3" VerticalAlignment="Top" Margin="0,0,0,0" Grid.Row="1" Grid.ColumnSpan="2" Height="250"
Width="300" ShadowEnabled="True" HorizontalAlignment="Left" AnimatedUpdate="true">
<vc:Chart.Titles>
<vc:Title Text="Summary of Savings"/>
</vc:Chart.Titles>

<vc:Chart.AxesX>
<vc:Axis Padding="4">
<vc:Axis.AxisLabels>
<vc:AxisLabels Angle="-90"/>
</vc:Axis.AxisLabels>
</vc:Axis>
</vc:Chart.AxesX>

<vc:Chart.AxesY>
<vc:Axis />
<vc:Axis AxisType="Secondary" />
</vc:Chart.AxesY>

<vc:Chart.Legends>
<vc:Legend LabelMargin="5" EntryMargin="6"/>
</vc:Chart.Legends>
<vc:Chart.Series>
<vc:DataSeries LegendText="Original" RenderAs="StackedColumn"
ToolTipText="Original, #YValue" Color="Orange">
<vc:DataSeries.DataPoints>
<vc:DataPoint YValue="{Binding LstSummaryChart[0].Orange, Mode=TwoWay}"/>
</vc:DataSeries.DataPoints>
</vc:DataSeries>

<vc:DataSeries LegendText="Event" RenderAs="StackedColumn" AxisYType="Secondary"
ToolTipText="Saving, #YValue" Color="#FF2C71B4">
<vc:DataSeries.DataPoints>
<vc:DataPoint YValue="{Binding LstSummaryChart[0].Green, Mode=TwoWay}"/>
</vc:DataSeries.DataPoints>
</vc:DataSeries>

<vc:DataSeries LegendText="Saving" RenderAs="StackedColumn"
AxisYType="Secondary" ToolTipText="Event, #YValue" Color="Green" >
<vc:DataSeries.DataPoints>
<vc:DataPoint YValue="{Binding LstSummaryChart[0].Yellow, Mode=TwoWay}"/>
</vc:DataSeries.DataPoints>
</vc:DataSeries>
</vc:Chart.Series>
</vc:Chart>

Attached Files



#2 vivek

vivek

    Advanced Member

  • Team Visifire
  • PipPipPip
  • 3,587 posts
  • Gender:Male
  • Location:Bangalore

Posted 03 April 2012 - 04:07 AM

Shiva,

If you don't want secondary AxisY, remove AxisYType property from DataSeries or set it to Primary.

Regards,
Vivek
Team Visifire


#3 shiva

shiva

    Newbie

  • Members
  • Pip
  • 9 posts
  • Gender:Male
  • Location:Mysore, India

Posted 03 April 2012 - 04:44 AM

Hi Vivek,
If I remove or set AxisYType to primary, I am getting wrong chart. Please help me.


Regards
Siva

#4 shoaib

shoaib

    Advanced Member

  • Members
  • PipPipPip
  • 924 posts
  • Gender:Male
  • Location:Bangalore

Posted 03 April 2012 - 05:15 AM

Shiva,

If I remove or set AxisYType to primary, I am getting wrong chart. Please help me.

If you want to hide Secondary Axis then you can set Enabled property in Axis to "False" in your code.

Example:-
<vc:Chart.AxesY>
    <vc:Axis />
    <vc:Axis AxisType="Secondary" Enabled="false" />
</vc:Chart.AxesY>
Regards,
Shoaib

#5 shiva

shiva

    Newbie

  • Members
  • Pip
  • 9 posts
  • Gender:Male
  • Location:Mysore, India

Posted 03 April 2012 - 12:55 PM

Shiva,


If you want to hide Secondary Axis then you can set Enabled property in Axis to "False" in your code.

Example:-

<vc:Chart.AxesY>
    <vc:Axis />
    <vc:Axis AxisType="Secondary" Enabled="false" />
</vc:Chart.AxesY>
Regards,
Shoaib


Hi Shoaib,
Thank you very much. It worked. Thanks once again.


Regards
Siva




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users