I'm making a chart via chart.js with 6 labels; 6 bars are displayed. I also have to draw a line, but only between labels/bars 3 and 4 .. so for labels 1,2,5 and 6 no line is displayed. How is this done ?
I found the solution: just fill the data with null for the labels/bars where you don't want a line to be drawn.
Related
Our new requirement in sap ui5 gantt chart is to divide each shape into 4 halves by applying 4 colours onto it.
Any suggestions/ideas/code sample would be very helpful.
The Gantt Char Elements are SVG Elements, so you should be able to extend sap.gantt.simple.BaseShape and implement your own renderElement method .
Another way would to draw 4 sap.gantt.shape.Rectangle on top of each other and set the height & width to x/2 and y/2 and adjust their xBias & yBias to cover 3 quadrants
I am using the Charts framework (danielgindi/Charts). My line chart is not showing all of the text on the x-axis on the last value. See image below.
How can I ensure that the whole text is shown?
chartView.xAxis.avoidFirstLastClippingEnabled = true
Other way: chartView.xAxis.setLabelsToSkip(0)
I need to match the designs to have the label extruding out with a horizontal line attached to the slice ticks. Is this possible?
There is support for lines to slice labels as of dc.js 2.0 beta 20.
It's called drawPaths:
https://github.com/dc-js/dc.js/blob/develop/web/docs/api-latest.md#dc.pieChart+drawPaths
It could be improved, as noted in the PR, but it's a start.
I'm creating a pdf report with itext and I'm having a problem. I create a line separator and immediately below I create a pdfTable. The problem is that de top border of the table is over the line separator I just created. Is any way to down a couple of lines in order to draw the next component with itext and solve this?
Thank you
Please take a look at the API documentation of the PdfPTable class. You'll fond methods such as setSpacingBefore(float spacing) and setSpacingAfter(float spacing). In you case, you could something like:
table.setSpacingBefore(6);
This will introduce a spacing of 6 user units (which by default corresponds with about 1/12 of an inch) before the table.
The spacing you need for "a couple of lines" depends on the leading. The default fonts size is 12 and the default leading is 1.5 times the font size. Two lines would be (2 x (12 x 1.5)) or 36 user units (about half an inch).
I have a browse with 5 columns. I want the dividing line between columns 3 and 4 to be a little thicker.
Is there a way to do this?
Short answer is no, you can't change the line between columns.
But you could add an empty dummy column with blank values between column 3 and 4, that you could get to look it like a thicker separator.
Regards,