jchart2d

Get coordinates of cursor in JChart2D

那年仲夏 提交于 2019-12-12 03:20:49
问题 I'm using JChart2D for trace a values of a double array. I'm using ZoomableChart and I want get coordinates (x, y) of cursor when this stay over ZoomableChart in my code to show them in a JLabel and draw a vertical line. How can I get the coordinates of the cursor? How can I draw this line? 回答1: To get a point is easy. Add a MouseMotionListener to the ZoomableChart. I'm guessing you want this information to represent a point in the data in the chart, rather than in the potentially zoomed

Histogram using Chart2D

江枫思渺然 提交于 2019-12-08 04:26:35
问题 I want to draw coefficient histogram of JPEG. I'm searching on Google for hours to know how to use Chart2D library, but there is no tutorial with examples. The array which I want to draw is hist[] . I created an object of LBChart2D , but I don't know how to set the array as data set to it. //coeff[] is the coefficients array for(int i=0;i<coeff.length;i++) hist[coeff[i]]++; LBChart2D lbChart2D = new LBChart2D(); EDIT:Here is what I'm trying : Object2DProperties object2DProps = new