how to draw a constant line in a javaFX scatter chart - java-8

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.

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,

Dimple.js Candlestick Chart

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

Which chart can I use to create XY range chart with D3.js like Blood Pressure Chart

I want to create a chart like one given here
http://www.bloodpressureuk.org/BloodPressureandyou/Thebasics/Bloodpressurechart
using D3.js utilizing existing libraries or any other HTML5 javascript libraries. UI seems to be similar to Treemap chart but it doesn't have plotting capabilities. And I want a movable plot also to select X,Y coordinates. Please suggest which charting library to use.
I was able to create a similar chart using the ZingChart javascript charting library. It can render in HTML5 Canvas.
http://zingchart.com/playground/run/53c402eb868c5
Initially thought about using a piano chart/treemap as you suggested. But what made the most sense was actually to use an area chart with stepped aspect for the colored blood pressure zones. Then I applied a scatter chart on top to plot blood pressure numbers. This approach could work for you in other charting libraries as well.
The plots could be made draggable with the node dragging plugin- http://www.zingchart.com/playground/presentation/category/4/ But I wasn't sure your request for selecting x/y coordinates and moving them would apply to the blood pressure use case.
I'm on the ZingChart team, so feel free to reach out if you have any questions about this demo.

Zoomable scatter chart

In Qlikview 11 I managed to set up (amongst others) a nice scatter chart without any major problems. Now I would like to be able to zoom into a region in that chart. Intuitively this could be accomplished by selecting a rectangular region with the mouse. Incidentally this works fine in "regular" line or bar charts. The new x and y axis regions correspond to the selected rectangle. However this does not happen with my scatter chart. I suspect this has something to do with the way dimensions are handled in scatter charts. For easier understanding I appended to screen-shots of the status quo - or how I don't want it to be.
Full chart with selected region http://img801.imageshack.us/img801/4873/6ccc.png
Chart displaying only the selected data http://imageshack.us/a/img138/9053/kck5.png
From what it looks like, I would guess that the scatter plot has hard coded axis max and mins. Check the "Axes" tab under chart properties, and uncheck the scale boxes. That should allow the chart to zoom in.

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