Gaspard Martin-Jouannaud Posted March 21 Share Posted March 21 (edited) I'm developing a line chart and I'm having trouble with marking the whole leaf. It works when marking the first one but if I ctrl+click a second leaf it unmarks the previously marked leaf. There's also a problem that on some lines, a specific point is not marked when switching from marking one line to another (doesn't happen if marking the line when nothing is marked) The blue circles are points at which the marking starts/stops. The ones in the middle of the line show that a point is not marked, breaking the line in 2. Here is the relevant code : svg.selectAll(".line") .data(data) .join("path") .attr("fill", "none") .attr("class", d => d.columnName) .attr("stroke", d => d.color) .attr("stroke-width", 3) .attr("d", d => line(d.values)) .clone() .attr("stroke-width", 15) .attr("opacity", 0) .on("click", (e: MouseEvent, d) => e.ctrlKey ? d.mark("ToggleOrAdd") : d.mark()) and data preparation : let data = colorLeaves.map(leaf => { let rows = leaf.rows(); return { color: rows[0].color().hexCode, columnName: leaf.key!, mark: (op?: MarkingOperation) => leaf.mark(op), values: cumul(rows) } }); I've checked and I do receive "ToggleOrAdd" as the value for op in the mark callback when ctrl is pressed It also appears that on every marked line the last value is never marked : console.log(data.find(l => l.values[0].isMarked)?.values.slice(-1)[0].isMarked) always gives false Edited March 21 by Gaspard Martin-Jouannaud Link to comment Share on other sites More sharing options...
Andrew Berridge Posted April 8 Share Posted April 8 Hi Gaspard, Can you confirm - is this still an issue for you? And, which version of Spotfire are you using? I just ran a quick test, and all appears to be working for me in similar circumstances. If it is still an issue, it may be best to run a quick troubleshooting meeting to help you find the solution. Please email dr@spotfire.com if you would like us to assist further. Thanks, Andrew Berridge Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now