I want to create a scatter data chart with two dimensional legend.
For Edit fiddle - JSFiddle - Code Playground it will generate with single dimensional like below
For the custom data
[{ Country: "US", Element: "A", Population: 197, Population_Unit: "1,000,000 People", Value: 94323, Value_Unit: "1,000,000 Int. $", Year: 1964 }, { Country: "US", Element: "A", Population: 194, Population_Unit: "1,000,000 People", Value: 93700, Value_Unit: "1,000,000 Int. $", Year: 1963 }, { Country: "USA", Element: "B", Population: 191, Population_Unit: "1,000,000 People", Value: 90275, Value_Unit: "1,000,000 Int. $", Year: 1962 }, { Country: "USA", Element: "A", Population: 189, Population_Unit: "1,000,000 People", Value: 89816, Value_Unit: "1,000,000 Int. $", Year: 1961 }]
How to custom the legend to achieve it based on Country & ElementA to show like below which show as table:
Its result show Country as first column and show Element as first row and then draw different graph for different county and different color for different Element.
Hello Edward,
I have been looking into your question and regarding the following:
I assume that an image that describes the desired result should be shown below this sentence, however, it seems that it is not attached.
Having this in mind, to ensure that your question is addressed correctly, could you please provide further details on the exact requirements? If possible, it would be great if you could try to attach the image again.
Additionally, I have prepared a small sample trying to demonstrate a possible configuration and it could be found here.
Please let me know if this is an accurate demonstration of what you are trying to achieve.
Looking forward to your reply.
Sincerely, Riva Ivanova Software Developer
It was confused that my image lost again.
For current result, the image is here Current Result
The Expected result is https://i.sstatic.net/4aYObfCL.png
I am wondering how to custom the legend based on the original source data, instead of only showing the X, Y data.