Pre loader

Tag: Pixel Coordinates

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0 votes
3k views

I’m using a candlestick series in a slightly unconventional use case, essentially to show a range at a given data point, screenshot below.
enter image description here

This works fine if the number of the data points and window size stays the same, but if I resize the window, the bars shrink accordingly, which I want to avoid.
enter image description here

So basically what I need is some kind of rendering mode that takes in a pixel width for the bars.
I’ve attempted to update the DataPointWidth on the series using a combination of the screen width and the number of points, but it’s extremely messy since the change needed isn’t linear.
enter image description here

0 votes
5k views

I want to convert XorYAxis value to total chart surface coodinate Point(X, Y), that includes the axises width too.
(Not chart modifier surface coodinate)

How can I get it?

1 vote
7k views

Hello,
I have a polar chart in my wpf application and I want to get data value from pixel coordinates, once the user has
clicked on scichart surface. This is what I tried:

   mouseClick = (s, arg) =>
        {
            var mousePoint = arg.GetPosition((UIElement)this.sciChartSurface.GridLinesPanel);

    //From cartesian to polar conversion
            double xpolar = Math.Atan(mousePoint2.Y / mousePoint2.X);
            double ypolar = Math.Sqrt(Math.Pow(mousePoint2.X, 2) + Math.Pow(mousePoint2.Y, 2));

            double a = sciChartSurface.RenderableSeries[_trace_index].XAxis.GetCurrentCoordinateCalculator().GetDataValue(xpolar);
            double b = sciChartSurface.RenderableSeries[_trace_index].YAxis.GetCurrentCoordinateCalculator().GetDataValue(ypolar);
};

This code gets mouse point coordinates, then it converts pixel coordinates to polar, and then (a,b) data are obtained with
GetCurrentCoordinateCalculator().GetDataValue(), but a and b have some strange values. I’ve tried just the opposite (from data value to pixel coordinate using GetCoordinate()), but it still doesn’t work. Any ideas? Is it possible to get data from pixel coordinates in polar chart?

Thanks in advance,
Juan

Showing 3 results

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies