Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » 180 degree (or half) dougnhut chart(How to create a half doughnut chart)
180 degree (or half) dougnhut chart [message #1857077] Mon, 16 January 2023 11:58 Go to next message
J D is currently offline J DFriend
Messages: 100
Registered: February 2021
Senior Member
Hi there everyone,

Here's wishing you all a very happy and prosperous 2023.

I'm trying to create a 180 degree (or half) doughnut chart to represent some data that form parts of a whole. Is this possible in Scout, and how do I do it?

I know how to create a full doughnut chart, so all I want is half of that, just like in the screenshot.

index.php/fa/42847/0/

Thanks for your assistance,

JD
Re: 180 degree (or half) dougnhut chart [message #1857081 is a reply to message #1857077] Mon, 16 January 2023 14:47 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 232
Registered: September 2011
Senior Member
Hi J D

Thank you very much and the same to you!

You can try chart type 'Speedo'. See the Scout Widgets Demo App for a sample (you have to switch to chart type 'speedo' in the demo app).

Kind regards
Mat
Re: 180 degree (or half) dougnhut chart [message #1857082 is a reply to message #1857077] Mon, 16 January 2023 14:54 Go to previous messageGo to next message
Fritz Schinkel is currently offline Fritz SchinkelFriend
Messages: 7
Registered: January 2022
Junior Member
Hi JD,

happy new year :)
There is no Scout-chart-property to achieve this, but as pie- and doughnut-charts are rendered using chart.js you can use all properties chart.js provides (here is the description for doughnut charts).
I think you look for the properties circumference and rotation. You can try them out in the widgets app using the custom chart properties box.
{
  "options": {
    "circumference": 180,
    "rotation": -90
  }
}

will give you
index.php/fa/42848/0/.

In your Java code you can use these properties in the chart config object like this:
BEANS.get(IChartConfig.class)
  .withProperty("options.circumference", 180)
  .withProperty("options.rotation", -90);


Kind regards,
Fritz
Re: 180 degree (or half) dougnhut chart [message #1857090 is a reply to message #1857082] Mon, 16 January 2023 19:12 Go to previous message
J D is currently offline J DFriend
Messages: 100
Registered: February 2021
Senior Member
Wonderful! Thanks a lot for your replies. It works perfectly.

Thank you Fritz for showing how to access the Chart.js features. I don't know JavaScript but I was wondering how to do it.

Cheers,

JD
Previous Topic:Hide Status on TablePage inside PageField
Next Topic:Displaying useful messages to users after failed authentication
Goto Forum:
  


Current Time: Wed May 08 20:12:01 GMT 2024

Powered by FUDForum. Page generated in 0.04356 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top