I made this cool pie chart and now I'd like to drop a shadow under it.
Is there anyway I can do it with DrawRect ?
I'd like to do it right under the pie chart (drawn using DrawRect).
Suggestions are welcome
Have a look at BNPiechart here - http://bynomial.com/blog/?p=104 . The code is open source.You can use it directly.If you do not want to use the library, you can refer the code for creating the shadow.
Related
I was wondering how to create a segmented control with just the bottom border like this:
I searched everywhere but I can't find an updated answer because they have just updated how segmented controls look. If anyone could provide the code or get me on the right track it would be very helpful.
I use this link one time Custom segment Button With CGRect
you should try to draw the segment button on a path and you can give any specification you want.
I am developing a Swift 4 application and am using the Charts 3.0.4 cocoapod. I managed to draw a BarChart but now I want to put the values of each bar within the bar itself. I find how to change the font of the values by using the .setValueFont method of the BarCharDataSet but I am not able to find how to change their positions.
Please take a look at the images for better understanding!
Thanks in advance!
Currently:
Goal:
Add this line:
chart.drawValueAboveBarEnabled = false
When I clicks on pieChart chartValueSelected() method called. But now my need is when I click in center in pieChartView, there will be no action perform.
I don't know what kind of chart (or Library) you used.
In this situation, the contents of function you written seem not to matter.
So I will explain the general situation.
You can place a transparent button in the middle of the pie-chart.
Then link that button to your "chartValueSelected()" function.
I want to align the items in the QListView centered like on this image:
Currently I manage to aligenn them only left:
In the property inpector of QtCreateor I have found nothing related to alignment. Also the style-sheet documentation for QListView tells nothing about the alignment.
Is this only to acheive using custom delegates?
I think you will have to subclass the QStyledItemDelegate object which is responsible to customize the rendering of your items.
Here is a link to the doc.
There are also some samples availaible on the Qt website:
Star Delegate
I comming back if I find a solution: I need the same effect as yours.
I would like to change the crosshair to a single vertical line. I'm looking for an example of a SChartCrosshair subclass that customizes the drawing. How do I customize the look of the crosshair?
there's a few links on the Shinobi site that show you how to customise the crosshair, they might help :)
a) http://www.shinobicontrols.com/blog/posts/2013/12/04/data-streaming,-crosshairs-and-custom-tooltips-in-shinobicharts/
b) http://www.shinobicontrols.com/blog/posts/2012/07/19/customizing-that-crosshair/
c) http://www.shinobicontrols.com/forum/shinobicontrols/2013/8/crosshair-with-line-only-to-the-x-axis/