List of Control Points of Easing Functions - silverlight

I'm looking for a list or a method to get the x1, x2, y1, y2 (KeySpline equivalent) values of the current Easing Functions (for ex: CircleEase with mode EaseInOut).
How I can get them?

Try the website easings.net , you could click on any easing graph and you will find the control points.

Related

How do I translate barcode location to millimeters on page?

IronBarCode recently added coordinates (X1, X2, Y1, Y2) to their BarcodeResult class.
Unfortunately there is no documentation on how to translate these coordinates to sth usefull like "millimeters from left page border".
Do you have any ideas on how to do that?

Single Axis Zoom in D3 & React

I am currently trying to make a simple graph using D3 and React, where it is possible to zoom in/out on both axes, or on one of the two axes separately. An example of such a graph made only with D3 is available here (http://bl.ocks.org/jgbos/9752277).
I managed to get the same behaviour using D3 and React, as you can see in this sandbox (https://codesandbox.io/s/objective-cohen-b92pr). This example works almost perfectly, but I sometimes see a "jump" when, for example, I zoom in on Y, then X and then both (see gif below).
My guess is that d3 stores a zoomTransform object {k, x, y} for each container (x-axis-listener, y-axis-listener & svg) on which the zoom event is called. I suppose we should be able to share the same instance of the object between all the containers, but so far I have not been successful.
Any guesses?
Thanks a lot !
There is a good reason why you can either have X and Y zoom separately, or have a single zoom factor in your graph (which applies to both X and Y), but you cannot have a situation where you can smoothly change them all. That's why:
A D3 zoom identity object has 3 attributes: x, y, k, where x and y are offsets from the initial pos (0,0) and k is the current zoom factor (1 by default).
Now, if you want to manage 3 separate zoom identities, you have actually 3 different objects {xV, yV, kV} for vertical zoom, {xH, yH, kH} for horizontal and {xG, yG, kG} for the global zoom. When you rescale, you can apply xV to xH, yH to yG and so on, but you cannot apply two different values (kV and kH) to one (kG), you will need to choose between them (otherwise you have a logical contradiction here).
UPD: You can, however, replace zoomBoth callback with mouseWheel event handler, take X and Y zoom identities, change both of them proportionally (divide or multiply to the same number) and then apply changed zoom identities to both X and Y scales. It's possible :)
I finally came up with a working solution, which can be found here: https://codesandbox.io/s/quirky-yalow-3y6q4. This is mainly a refacto in React of this code observable: https://observablehq.com/#d3/x-y-zoom.
I'm using only one global transform object in the dom, and using the useState hook to store the global transform previous value, and one transform object for each axis.
The actual and the previous global transforms object allows me to retrieve the parameters to pass to the transform.translate and transform.scale methods in order to update the axis transforms object accordingly to where my mouse is.
This feels really "hacky" to me and I there should be a more elegant way of doing this.

Syncfusion Line chart does not plot line and shows multiple points on Xaxis for same data

I am plotting 3 different lines with the following data.
x10:0 y10:65000 x20:0 y20:10000 x30:0 y30:7000
x11:1 y11:40000 x21:1 y21:61000 x31:1 y31:13000
and so on....
But the chart has 3 different x's for x1, x2, x3 respectively and it does not connect y1 and y11(the line) and it shows that the StrokeThickness of chart elements is 2.0 and stroke shows the color I specified. (All above values taken from VS debug)
I did not use any MVVM, but set the datasource, BindingPathsY, BindingPathX via event handlers.
Is there any extra function I need to call if I am not using MVVM for the strokes to appear?(Similar to the canvas stroke.)
Points were misleading.
I was creating a new instance of collection for x10,y10 x11,y11 and x12,y12, which was the problem. So it created another set of points, for same data.
Instead I changed the code so that I create only one collection for 3 different graphs.
In order to connect same X-axis points values as a straight line, then we need to use the Linear axis (NumaricalAxis, DateTimeAxis, LogarithmicAxis) instead of using CategoryAxis for Chart Primary Axis.
Regards,
M.Sheik

Draw a point on ESRI.ArcGIS.Mobile.WPF

I am using ESRI.ArcGIS.Mobile.WPF dll to access the Map.
Using MapDoubleClick event is giving me X and Y coordinates. I need help in drawing a point on the Map based on X and Y coordinates I get from the doubleclick event.
I see that Map.Invalidate() must be used but ArcGis Mobile for WPF do not have Invalidate()

Inheritance Issue

I have drawing program that the user can draw either an ellipse or a line, which both derive from shape. I am creating one rubber band, and depending on what the user is drawing i say
rubberBand = new Ellipse();
//or
rubberBand = new Line();
but if i set the rubber band to line, I cannot access the x1 x2 etc, it says shape does not contain a definition of X1. I tried creating an Ellipse and the casting it to a line but still same issue. How do I resolve this?
This sounds like a basic polymorphism question to me. Think about what are you actually trying to do- for instance, a line has 2 points (X1/Y1, and X2/Y2). An ellipse (an oblong circle) has no such property- it has a width, maybe, and a height, and possibly an X and Y coordinates (or a position property).
I am guessing that you are attempting to adjust the bounds and/or location of the shape when the user is dragging it with the mouse. In this case, the operations that you need to define for the shape depend on what kind of shape it is. For a line, you need to write a method that adjusts X2 and Y2 (or whatever). For an ellipse, you will probably need another method that adjusts shapes that have width, height, left, and top properties. Then you just need to determine which one to call depending on which kind of shape you are dealing with.
You need to think about Liskov Substitution Principle:
http://www.objectmentor.com/resources/articles/lsp.pdf
http://www.oodesign.com/liskov-s-substitution-principle.html

Resources