Is It possible to change line direction d3 GeoJson? - javascript

I am using d3 v7 with Vue js and drawing world map. I wanted to connect two points using lat/long but it is taking closest direction. How can I change it as link below? Yellow line is being drown by d3, what i want is white line, Is it possible to change? Thank you so much.
https://i.stack.imgur.com/eJM1k.png

Related

Chart.js doughnut chart with gradient along path/stroke

I'm trying to achieve this using chart.js:
Notice how the gradient follows the stroke, starting at the red colour at 0° and ending in the yellow colour, with a smooth gradient between.
I've tried a few methods found while searching around but have had to admit defeat (at least I've hit the limit of my canvas and js skills)...
Using the usual chart.js setup and customising using:
Chart.pluginService
for the centrally placed number, this is what I have so far:
http://jsfiddle.net/voodoo6/c2tzydv3/19/
The closest I can find to a solution to creating the gradient was here:
Angle gradient in canvas
There is an issue related to this on the chart.js repo here
I'm struggling to get it working – has anybody achieved this using chart.js or have any idea how it can be done?
Thanks as usual!

How to fill point background of line chart in chartjs with an image instead of color?

I am trying to fill the point background of cricket line graph with a 'w' image. For example, consider a graph of 50overs (x-axis) vs Runs(y-axis). I want to plot a wicket on the graph in point background whenever wicket falls!
Any help welcomed and much appreciated!
Attaching a reference image]1

Link two D3 plots

I'm trying to link two D3 plots so that selecting part of the histogram on the right, causes a certain scatter plot to display on the left.
This is my attempt.
My current question is why the right plot isn't rendering, which I think goes back to how to create and refer to multiple SVG tags in d3.
D3 has SVG controls for this type of situation. What you are looking for is a brush with context.
Here are the API docs:
https://github.com/mbostock/d3/wiki/SVG-Controls
And here are two great examples:
http://bl.ocks.org/mbostock/4063663
http://bl.ocks.org/mbostock/1667367

different symbols in a google charts scatter plot

I'm using the google charts library to make some interactive scatter plots. And I cannot find is whether you can have symbols other than circles as "markers" ? As far as I can see it was possible with the previous obsolete version of google charts. But is it impossible with the current one ?
Scatter chart "playground":
https://code.google.com/apis/ajax/playground/?type=visualization#scatter_chart
Currently (as of July, 2013) there is no way to do this within the chart options. You have a choice between circles and no markers, and that's it.
You could go through the code and change the SVG using javascript, changing the circles to rectangles, and manipulating the coordinates appropriately (or drawing paths, or whatever you'd like). That's really the only way to do it.
Edited to add:
Additionally, you could set a fill for the circles themselves using javascript, and make the fill any shape you'd like.
You can do it with the help of image charts. You can change the color and shape of the markers using this.Refer this link. An example for the different shape markers
Click here to see this. For more google charts related queries take a look at this jqfaq.com

select an area of a scatter plot in javascript

I am trying to achieve the following with javascript:
draw a scatter plot with many (~10,000) points
allow the user to draw a curved shape on top of the plot to select a region (I am open to exactly how the shape is designed: an ellipse would be fine, or a polygon, or a path defined by bezier curves)
get a list of the points inside the selected area and do something with them.
Obviously, it is step 2 that is causing the problem. I have previously used jqplot to something similar to the above using a rectangular selection, but it is vital for the purposes of this project that the user be able to select an elliptical region.
Can anybody give any hint as to which javascript library would allow this?
I know that you can create paths using Raphael. I would have though that the most difficult part of this would be the last, but I did find this (yes, I know it's VB, but it gives a basis that can be applied to JavaScript).

Categories

Resources