0

How can I make autoscale in Visifire Chart CandleStick ?

When I try it:

xmlns:vc="clr-namespace:Visifire.Charts;assembly=WPFVisifire.Charts"

<vc:Chart Width="500" Height="300" Theme="Theme2" Name="chartMain">
    <vc:Chart.Series>
        <vc:DataSeries RenderAs="CandleStick">
            <vc:DataSeries.DataPoints>
                <vc:DataPoint AxisXLabel="1" YValues="100.5,101.2,101.3,100.5"/>
                <vc:DataPoint AxisXLabel="2" YValues="100.8,100,101.1,101.4"/>
            </vc:DataSeries.DataPoints>
        </vc:DataSeries>
    </vc:Chart.Series>
</vc:Chart>

It doesn't aotuscale.

example.jpg


project.rar

Itteh Kitteh
  • 437
  • 5
  • 6
FriendsKenny
  • 150
  • 3
  • 11
  • what you want to do ? your current chart doesn't show candlesticks. – AnjumSKhan Nov 27 '15 at 08:03
  • if i add more vc:DataPoint it'll be candlestick. http://www.visifire.com/documentation/Visifire_Documentation/Charts/Chart_Types/candlestick_chart.htm – FriendsKenny Nov 27 '15 at 08:19
  • Now I've found min and max myself: ` ` But on [this page](http://www.visifire.com/documentation/Visifire_Documentation/Charts/Reference/Attribute_Reference/AxisMaximum.htm) said that "The default value is automatically calculated from the DataPoints. Hence users need not set this value". And it don't works. – FriendsKenny Nov 27 '15 at 08:29

1 Answers1

0

I did following changes, and chart appears correctly. Your YValues are wrong. They should be according to Open, Close, High, Low. http://www.visifire.com/documentation/Visifire_Documentation/Charts/Reference/Attribute_Reference/YValues.htm

<Grid>
        <vc:Chart Theme="Theme2" Name="chartMain">
            <vc:Chart.AxesX>
                <vc:Axis AxisMaximum="20" />
            </vc:Chart.AxesX>

            <vc:Chart.AxesY>
                <vc:Axis AxisMinimum="95" />                
            </vc:Chart.AxesY>

            <vc:Chart.Series>
                <vc:DataSeries RenderAs="CandleStick">
                    <vc:DataSeries.DataPoints>
                        <vc:DataPoint AxisXLabel="1" YValues="100.5,101.2,101.3,100.5"/>
                        <vc:DataPoint AxisXLabel="2" YValues="100.8,100,101.4,99"/>
                    </vc:DataSeries.DataPoints>
                </vc:DataSeries>
            </vc:Chart.Series>
        </vc:Chart>
</Grid>
AnjumSKhan
  • 9,647
  • 1
  • 26
  • 38
  • In YValues random values. I tried but my data in DataPoint is dynamic and I don't know min and max value. – FriendsKenny Nov 27 '15 at 08:35
  • In your Model, you can find Min and Max values easily, and expose these with two properties which can be bound. – AnjumSKhan Nov 27 '15 at 08:40
  • I do it now. But in [doc](http://www.visifire.com/documentation/Visifire_Documentation/Charts/Reference/Attribute_Reference/AxisMaximum.htm) said "The default value is automatically calculated from the DataPoints. Hence users need not set this value". – FriendsKenny Nov 27 '15 at 08:51