|
I started with a dataset like this: 1380 records all the way up to 2021. Then I wrote a couple of queries for the various part of the diagram (a map in Pseudo Mercator projection, everything is centered around the origin.) For example the following SQL is used to create the 12 lines that point out from the centre: -- $manifold$ VALUE @part FLOAT64 = 360 / 12; VALUE @radius FLOAT64 = 125; TABLE CALL TableCacheIndexGeoms( ( SELECT [maand] , GeomMakeSegment( VectorMakeX2(0,0) , VectorMakeX2( @radius * Sin([angle] / 180 * PI) , @radius * Cos([angle] / 180 * PI) ) ) as [geom] FROM ( SELECT [maand] , [maand_nr] * @part AS [angle] FROM ( VALUES (1, 'Jan') , (2, 'Feb') , (3, 'Mrt') , (4, 'Apr') , (5, 'Mei') , (6, 'Jun') , (7, 'Jul') , (8, 'Aug') , (9, 'Sep') , (10, 'Okt') , (11, 'Nov') , (12, 'Dec') AS ([maand_nr], [maand]) ) ) ) , true) A similar query creates the 12 points for the label position of each month. Then a query for the circles. VALUE @step INT32 = 1000; VALUE @start FLOAT64 = 0; VALUE @end FLOAT64 = 5085; VALUE @radius FLOAT64 = 120 / ((@end - @start) / @step); TABLE CALL TableCacheIndexGeoms( ( SELECT [value] AS [ringnumber] , [value] * @step AS [value] , GeomMakeCircle(VectorMakeX2(0,0), [value] * @radius) as [geom] , GeomMakePoint(VectorMakeX2(0, -[value] * @radius)) as [geom_label] FROM ( TABLE CALL ValueSequence(1, (@end - @start) / @step, 1) ) ) , true) It creates both the circles and an anchor point for the labels as well. The variables control the size between each ring. And finally the most important query that created the lines based on the data. See attached .map file. Hope this gives you some insight. Chris Attachments: nightingale chart.map
http://www.mppng.nl/manifold/pointlabeler |