Dimple.js Candlestick Chart - d3.js

I am using Dimple.js to plot several data series and I need to add a candlestick or hi/lo series on to my existing chart. After some analysis, I have found two possible approaches to do this:
1) Use the floating bar option in Dimple.js. Since the "widths" (heights on the chart, but widths for the floating bar) would be all different, I would need a different data series for each candlestick. This feels like a hack, but the one advantage is that this would be using Dimple to do all the rendering. I would probably not go this route unless some had a thought on how to make this less of a hack.
2) Drop down to D3 to draw lines between the points. I can use Dimple.js to graph both the top and bottom elements of the candlestick, then use D3 to draw the line between the points. I would do a selectAll() on one of the series, and then draw a path to the related point in the other series.
If there are other suggestions on an approach, please let me know. Thanks!

You can use this example to build candlestick charts using d3.js

Related

Scatter plot point shape

Is it possible to change the scatter plot point from the usual circle to something else. And more specifically can this be linked to a Dimension?
I know I can change the colour but we are already using a Master Item colour, and need to and another dimension.
We are also using the marker size for a measure so we cant co-opt that either
We are using Qlik Sense (SaaS).
From experience, no, you can't, I have ended up creating my own extension to create my own scatter plots to have donuts instead of dots using chart.js
Thanks,

How to draw horizontal stacked area chart by ios-charts

I am using iOS Charts by Daniel Gindi.
I need to draw horizontal stacked area chart (Example). But I cannot find similar charts in examples of the library. I am trying to customise Horizontal Bar Chart like in example. But I cannot to avoid square corners.
How can I draw line instead of bars with squared corners?
Is it possible in this library or I should use another one?
Yes you can.
Use line chart instead ,and set drawFilledEnabled to true.
But the filled area is between line and x axis, so you may need to rotate the chart.

Drawing polygons using latitude/longitude values in D3

I have a set of polygons where the position of their vertices (corners) are defined as latitude/longitude values.
I want to use D3 to draw these. I don't want anything fancy (like a background containing the world map, etc). The only thing I want to do is to draw the polygons.
I have looked up on Google for a solution, but what I find is things like http://datamaps.github.io or https://github.com/mbostock/d3/wiki/Geo-Paths and they all show a background of the world map or the like which is what I don't want to do.
Suggestions are welcome.
In your particular case, using the geo functionality of D3 seems like overkill -- all you need to do is use the D3 scales to convert the coordinates to screen coordinates, i.e.
var scale = d3.scale.linear().domain([minCoord, maxCoord]).range([minScreen, maxScreen]);
Demo (based on provided fiddle) here.

how to draw a constant line in a javaFX scatter chart

I'm new to JavaFX and implemented a scatter chart with various data series. That works well so far, but I want to highlight the data in a specific area as these are ok and all outside the area are bad. so my plan is to draw two lines in the chart, for example one at y=80 and one at y=120. is there a comfortable way to accomplish this? I wanted to avoid drawing the lines with a LineBuilder or so.

Readable labels for D3 streamgraph

I'm trying to apply readable labels to a D3 Streamgraph that is rendered using completely dynamic data - various different datasets that are evolving over time from live data and the controls offered to manipulate what is shown too. All this works well - the problem is how to clearly label the streams - short of using a legend.
The great variation of hues and luminance needed makes choosing readable styling for labels that float over the graph extremely tricky, particularly with the limited SVG styling available cross platform and that the labels will inevitably overlap on the background sometimes too. For instance black coloured labels 'work' but it's hard to read sometimes over the top of darker colours (which we really need to ensure a good range)...
Anyone done anything similar/addressed same challenge? I'm currently pondering using a legend instead.
A couple of ideas may help:
Add a background rectangle around the text with opacity set to 0.7 (the color being the same as the data series). This helps make the text pop. For the border of the rectangle, use d3js rgb.darker or rbg.brighter.
var pathStroke = d3.rgb( item.color ).darker(1.4).toString()
For preventing overlapping labels, I can think of two solutions - both hard. Use d3js Force Layout or write your own layout code. We ended up writing our own layout code for tooltips in d3-traits. See tooltips.js and layout.js.
d3.trait.layout.verticalAnchorLeftRight( foci, self.chartRect())
layout.js does have some general purpose and very flexible layout routines. It will layout rectangles within a bounding box avoiding overlap and determines if the labels need to be left or right justified. If the origins of the rects are toward the right edge of the bounding box, they are right justified.

Resources