 Ac mae'n gweithio cael eu cyffredinol i'r cyffredinol, fel gyda'r sefydlu gwneud yw'r cyffredinol. Yn y ddod, mae'n ddod am gweithio arbyn yr ystod dyma yng Nghymru ac mae'r graffau yn ystod ymddydd fel gweithio? Mae ymddo'r ddod yn ystod ystod, mae'n gweithio yn ystod ystod yn ymddiadau o gwaith mae'n gweithio'r gwaith yng nghymdd. Mae'n gweithio'r gwaith bwysig a'r gweithio. i'w ddim yn gwelio'r ardystwyd yr aelio, oherwydd mae'r ddifigau enw'r ddifigau. Mae oedd wedi cymdeilio'r ddifigau'r ddifigau o fewn y byddwch yn ei gwybod fel hefyd. Felly mae'r ddifigau'r ddifigau yn ddifigau'r ddifigau? anyway so let's focus on this big dial that i'r gweld i'r hwyl télol 55% now it's changed to 70% and you can see that that actually grows a bit bigger it's got the segmented effect on it as if there are individual leds coming on as something to represent the value as it increases and what you can see is that maybe you can also change the number of segments as well so we can see that it looks less fine, a bit more coarse As we reduce it down to maybe another 20, but the other thing you can kind of see with this is that this will always snap to that number of segments as well. So you could probably set this number for whatever aesthetic you want and then your user or your data will change this number. If I do this as 71% you can see the number in the middle changes and then 72% it's not actually add a new segment on 73%. 74%, 75%, 76% before add an extra one on top. So this is snapping to these segments. So you can kind of draw this sort of thing manually and then put a donut graph behind it, but it will always partially fill the segment. So what I'm going to cover here is how we can build that effect. What data manipulation do we need to do to make this effect work? So I'm going to open up a new sheet, just zoom in a little bit so it's bigger to see. What we're going to do is just start with what information do we need. So I'm going to start with n, set this as cell styles input and then I want a percentage. So I'm going to tagline it as PC and set this as input as well. And let's say I'm just going to keep it as 10 for now just so it looks a little bit easier when we've got the data on screen and then we can increase it later. Maybe the percentage I'm just going to make is 0.5. If we set that to percentage, well we can then just type the percentage in. Type in 55 instead of worrying about 0.55 or something like that. So 50%. Right, so what next? 50% is the thing we want to display so what isn't being displayed? I'm just going to label that PC2 for now. That is going to be 1 minus lap percentage. And if you set this as a percentage XL, kind of automatically formats that one for you. Now we want to think about well how many segments are going to be filled from this. So I'm just going to label this on segments and then that is going to be 50% times B1 there, which is 10. So 5 are going to be filled. And then sec2, well that's going to be the remaining percentage multiplied by that. Now here's the thing. If this is then 50.25% or something like this, these are no longer round numbers. So if we put a donut graph in like this, it wouldn't be locked to the segments that we're going to draw. So I'm going to wrap these in some new functions. The first one I'm going to pick is ceiling. So these are always round directly up. So like 2.001 will round up to 3. And this one I'm going to wrap it in floor. So floor dot math of that. And that's kind of the opposite effect. So 2.99999 will still round down to 2. So it doesn't matter which order you do those in and in which effect you want if you've got really low numbers. Usually if it's like 100 or something, it's probably not really noticeable. But if it's like 6 or 7, you might want to think about this. And it just means that those two numbers, if you do one rounded up and one rounded down, will always add up to the right number. So what we've got here are basically a number of segments. And we could make a donut graph about this that locks to a certain percentage, no matter what this number is, it will always round off. But how are we going to draw some segments? How are we going to get this effect where all of these are like lights that have come on and then this one's blank? I'm going to start with a sequence function. So apologies if you're not working on the latest version and don't have this. There are a couple of manual workarounds. And the number of rows I want are the number of highlighted segments. That's this one plus one. So I've got 1 to 7. And if I set this to 10 for a moment, you can kind of see we'd have 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. But here we've got 1, 2, 3, 4, 5, 6, and then a 7th one is empty. So that's what we've got here. We're going to have 6 that are all one unit big and then a 7th one, which is the remaining. So for this I'm going to do kind of an if function. So if that number there is less or equal to the number of the highlighted segments, or less or equal to 6, I want this to equal 1. If it's greater than that, then I want it to equal 4. So what I'm going to end up doing is this will produce 1, 1, 1, 1, 1, 1, 4. Except it's not because I need to change this D1 here to D1 hash. And it will take advantage of the dynamic array there and fill it in automatically. So if I have like this, it will always sum to 10. If I change that to say 20, it will sum to 20 segments. The first 11 of them will be 1. Now this is where we can now insert, let's go to where the power charts are, insert a donut chart and you can kind of see what's going to happen here. I'm going to delete the title and these legends just to make it a bit obvious what's going to happen. So if I change the number of segments, you can see they get a little bit broader, but this unhighlighted one stays the same. Now if I increase the number of segments though, it doesn't work. We're still stuck with the same number and that's because if you click on it, it only highlights this many. So ideally we would want to stick in just another hash again to make it like E1 hash to make the array dynamic. But unfortunately it's not quite that straightforward, we need to do something else. So I'm just going to click on E1 and then go to formulas and define names. So I'm going to define this as maybe something called segments. And here is where I'm going to change it from E1 to E1 hash. This works so sheet 1, the dollar signs are there to make sure that it's not going to float around. Now if I type in the word segments, equal segments, it's going to replicate that entire set of columns again. Great. Now click on my graph and where it says sheet 1, E1 here or dollar E1, we want to delete all of that and just type in segments. It will be lovely to stick the hash there just directly but for whatever reason it just doesn't work. So I'm going to return that and now the graph is properly referencing this dynamic range here. So if I reduce the number of segments, you can see, well there are fewer segments, the amount filled is still roughly about the same. That's 50.25, isn't it? So if it's exactly on 50, it's exactly 50% there. So if I can increase the number of segments, you can see it gets a little bit more detailed. I can just keep going up. This range here gets longer and longer but it appears on here. So the rest is just kind of adapting this to look right. So one thing I'm going to do first is I'm going to select my data and have a look at these series. So I'm going to rename the series as segments and I'm going to add a new one called glow. And those series values are just going to be these because those are counting a number of segments but they're also a proportion. So these need to be filled with a glow and it's going to come from this series. I'm just going to set that up now. If I click on the outermost one, click again so I'm just highlighting the orange. I'm going to format that and just make that, I don't know, make that a darkish colour. And then click the outside one, make sure that's clicked. Make that white. I'm going to highlight the whole graph and just set that background colour to that dark colour as well. So you can see what's happening now. This is going to glow. And the inside rings, well I'm going to set that to fill no fill and the outline is now the same background colour so it matches. Trouble is that's now displayed inside each other. So what we're going to do is go to chart design, change the chart type and come down to combo and make sure these are all set to donuts. And what you can do is you can click the secondary axis. So if we have them both on the same axis, they're displayed sequentially. If we click one of them to be on the secondary axis, they now start to overlap. So you can immediately see we've got our multi-segment thing. And if I want to increase that, I'm starting to fill it in. And if I want to increase the number of segments, I just change that and it starts working. So if you then want to change it, if you want to change the one underneath, you unfortunately have to go back to change chart type, tick that off the secondary axis, put the other one on and then bring it to the top and you can just start playing with this one. So for instance I'm going to format this to remove all the lines. No outline there so that's going to disappear. And I'm just going to click on this one and come back to you, where's the shape style? Glow, I'll put just a random glue to it. Now I want to go back to chart design, change that type again, tick it off the secondary axis, put the other one onto the secondary axis. You can see that it's now filling up. So you can build this and do all sorts of different ways. If you want, it's just a case of changing the aesthetic, as you want probably something like, make the lines probably thinner than you expect. These weights are currently about one or something, but we should probably go about half. Make the glows really subtle, like drop the transparency or increase the transparency to 80% or 90% usually, things like that. And just have a play around. Have a look at sample images. Google images is full of them. Just have a look and see what you can do to replicate it, because not all of it needs to be perfectly functional. There's certainly more hacks you can add on to make it that functional. But there you go. Once you've started at this point, you can start to adapt it and make it a lot more dynamic and add in the fancy stuff if you want.