Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

How to restrict the no.of legends to be shown in a chart.

$
0
0
1. Library version is (v9.0p_2013-09-22/PowerEdition Deployment 2013-09-22)

2. Problem Statement: How to restrict the number of Legends to be shown in Chart.

3. We are showing 100 country records where 100 Countries are the Legends. And it shows 100 countries as Legends from an array of COLORS having size 20. And these set of 20 colors gets repeated after every 20 country. Image attached as Scatter_Chart.jpg and Scatter_Chart_Data_Table.jpg

I am using the below API

String[] COLORS = {"#000000","#A6CEE3","#1F78B4","#B2DF8A","#33A02C" ,"#FB9A99","#E31A1C","#FDBF6F","#FF7F00","#CAB2D6" ,
"#6A3D9A","#FFFF99","#66C2A5","#FC8D62","#8DA0CB", "#E78AC3","#A6D854","#FFD92F","#2171B5","#E5F5E0"} ;
setDataColors(COLORS);

4. Desired Output: I want to plot chart for 100 countries but want to show only first 20 Countries as legends.
Please let us know how to achieve this.

Attached Images
File Type: jpg Scatter Chart.jpg (128.5 KB)
File Type: jpg Scatter Chart_Data_Table.jpg (111.2 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles