Protractor - is there a way to Do a click/drag event with x,y coordinates - angularjs

I have diary page with rows (time) and columns(person). I want to drag and select three rows from top to bottom. Please help me on this.

You use actions to perform drag and drop in Protractor, which also includes offset x & y. Something like:
browser.actions().
mouseDown(timeElement, {x: right, y: bottom}).
mouseMove(personElement, {x: right, y: bottom}).
mouseUp().
perform();

Related

Remove duplicate values on x axis for chart js

I have got an X axis and it has the months displaying. However for the month of august it is displaying twice...I am not to sure why that is. I would like to remove the duplicated Aug-2020 on the x Axis.
Here is a coding sandbox I created to show what I mean.
I don't know what you're trying to achieve but in your app.js file change maxTicksLimit: 5, to maxTicksLimit: 2, and it will change to single value for Aug.
You have to calculate the chart before plotting.

SceneKit Animations on DefaultCameraController

and pardon my ignorance here. I am brand new with SceneKit. I am trying to get my default camera controller to animate with a sort of smooth "panning motion". I am trying to use something like:
scnView.defaultCameraController.translateInCameraSpaceBy(x: 10, y: 10, z: 10)
When the SCNView enters the view controller.The problem is that this action jumps and I would like it to animate, transitioning from it's current perspective to it's new position where the frames in the transition between the two points in space are represented.
I would like to have this happen on the defaultCameraController as well if possible.
Thanks!
A quick solution to get the animation to work is to wrap your translation in an SCNTransaction block.
SCNTransaction.begin()
SCNTransaction.animationDuration = 5
scnView.defaultCameraController.translateInCameraSpaceBy(x: 10, y: 10, z: 10)
SCNTransaction.commit()

MS Chart - Chart type area- Backcolor issue

I'm using ms charts in winforms.
Till now i'm able to create this chart. Now the problem is i want that reddish paint to be inside the area, it is now starting to paint from 0, so looking reverse of what i actually want.
This is my first question to stackoverflow, it may not be constructive but i will give more info if you ask.
Apologies and thanks.
Some part of Code:
ChartArea.YAxis.Maximum = 0;
ChartArea.YAxis.Minimum = -100;
ChartArea.YAxis.IsStartedFromZero = False;
Series tempSeries = chartSSIDDetails.Series.FindByName("Series1");
tempSeries.Points.AddXY(0, -100); tempSeries.Points.AddXY(1, -20);
tempSeries.Points.AddXY(2, -20); tempSeries.Points.AddXY(3, -20);
tempSeries.Points.AddXY(4, -100);
There is nothing much than this. Please let me know anything else you need.
Graph is showing correct as per the code you have shown.
As the values for Y axis are negative, graph is projected downwards
(so you can see values are starting from 0 on Y-axis)
You will have to pass positive integers to Y-axis if you want to see it opposite way.
You can later customize label to show Y-axis values to negatives.

Zing Charts - Place Items on Map

I am trying to put Location markers on an USA map similar to the one in this page
http://www.zingchart.com/blog/2012/07/17/interactive-html5-maps-api/
(Place items on map section.)
I am not able to find the JSON attribute for specifying this (The link on it is taking to the site's home page only).
Please help me on how to do this or point me to any documentation on it.
[--EDIT--]
I found a function to get the XY coordinates on the map using the Lat/Lon value and vice-versa (zingchart.maps.getXY(mapid, lonlat, itemid)).. But I am still stuck with placing a marker on that XY point.
[--EDIT--]
Below answers work as expected. I am trying to put markers on US map. I would like to know how to place markers on Alaska/ Hawaii states with lat/lon info since they are placed below california as a separate polygon though they are geographically above the US.
I'm on the ZingChart team, and I can definitely help you out with this!
It's critical that you wait until the map has loaded before finding the XY coordinates. Use the ZingChart 'load' API event listener to wait until the chart has loaded:
zingchart.load=function() {
drawPoints();
};
Inside our drawPoints function, we'll find the longitude and latitude values. If the values are north and east, the numbers will be positive, south and west will be negative. For example, Sao Paulo is located at 46.6333° W, 23.5500° S, so we would use [-46.63, -23.55]. In this map demo, we've placed a marker at Bangalore, which is located at 77.5667° E, 12.9667° N, so we'll use [77.57, 12.97].
var lonlat = [77.57, 12.97];
var bangalore = zingchart.maps.getXY('map', lonlat);
The getXY method returns an array of length 2, with the value at index 0 being the x position and the value at index 1 being the y position for your map.
Now that we have the X Y coordinates for Bangalore in our variable, we can use the addobject API method to place a marker at that location. Below, 'zc' is the same as the id given to the div used to place the chart.
zingchart.exec('zc', 'addobject', {
type: 'shape',
data: [{
x: bangalore[0],
y: bangalore[1],
type: "circle",
size: 3
}]
});
To see the code in its entirety, view the page source of the map demo provided.
Please let me know if you have any more questions!

Changing one single marker in a series in ExtJS charts

this is what I'm trying to do...
I have a chart with a line series with markers in it. In the X axis I have dates and in the Y axis a number. So lets say I have in x dates from yesterday to next week. And each day has a corresponding Y axis value.
What I want to do is change the color of the marker that belongs to the actual date.
In other words, to make it clearer, I want to change the color of a single marker in a ExtJS line series. I know of markerConfig but that doesn't seem to help since it applies to all markers.
I haven't found anything like this around so I stopped here to see if you guys could help me.
Thanks in advance!
I think the easiest way to do this is to highlight a single datapoint in a series.
First, define your highlight style.
Ext.create('Ext.chart.Chart', {
...
series: [{
type: 'line',
highlight: {
size: 10,
radius: 10,
fill: 'red'
},
...
});
Then, select the appropriate datapoint in your series and call the highlightItem() method. Here's an example showing how to use the method.
var series = myChart.series.get(0);
series.highlightItem(series.items[2]); // highlight the 3rd data point in the series
The result would look something like this.

Resources