Bar chart with linear axis instead of category axis

4 posts, 0 answers
  1. Eamon
    Eamon avatar
    2 posts
    Member since:
    Nov 2012

    Posted 25 Nov 2012 Link to this post

    Hi, was was wondering if it was possible to have a chart with a linear axis for both the x and y axis that behaves like the bar chart in that each value is drawn as a bar/line from the axis to the value?  The scatter point chart is the closest in behaviour to what I want, but instead of a single point, I need a line from the axis.

    regards,
    Eamon
  2. Missing user
    Missing user avatar

    Posted 28 Nov 2012 Link to this post

    Hello Eamon,

    This scenario is not supported by RadChartView because BarSeries can work only with a categorical axis. Could you please give us an example or a screenshot of what you're trying to achieve? Once we have a better understanding of your scenario we might be able to provide you with a workaround using our control.

    Regards,
    Ivan N.
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Eamon
    Eamon avatar
    2 posts
    Member since:
    Nov 2012

    Posted 29 Nov 2012 Link to this post

    Given the following data values: (x,y)
    150,300
    1100,200
    400,300
    750,800
    900,900

    I'd like to produce a chart similar to the image attached (mock up from paint).

    Note the linear scaling on the y axis.  Typically the data I would be charting would be a price on the y axis, and volume on the x axis with around 2000 values.  Prices range ~-$1000 to ~$15000 and need resolution to the cent (0.01) so it is not practical to simply create empty values for every 'cent' category because that would mean ~1,600,000 'categories'.

    We're currently also evaluating http://www.scichart.com/ and it does seem to be able to do this though it does have some nuances that may not exist in Telerik so I'd like to be able to achieve the same with Telerik before making a decision.

    regards,
    Eamon

  5. Missing user
    Missing user avatar

    Posted 04 Dec 2012 Link to this post

    Hello Eamon,

    Thank you for your input. This is the work around we've come up with:
    <telerik:ScatterPointSeries ItemsSource="{Binding}"
                       XValueBinding="X"
                       YValueBinding="Y">
        <telerik:ScatterPointSeries.PointTemplate>
            <DataTemplate>
                <Canvas Width="2" Height="2" FlowDirection="RightToLeft">
                    <Rectangle Width="2000" Height="2" Fill="Blue"/>
                </Canvas>
            </DataTemplate>
        </telerik:ScatterPointSeries.PointTemplate>
    </telerik:ScatterPointSeries>
    This code will render the scatter points as lines originating from the Y axis. Alternatively, you can swap the Rectangle's width and height which will change their apparent origin from the X axis.

    All the best,
    Ivan N.
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top