User (Legacy) Posted February 28, 2002 Report Share Posted February 28, 2002 Hello! If you follow my posting yesterday (Problem Producing A Legend Box) you will see that I am still having problems. As Chris suggested, I am now asking anyone else, especially those at Software FX, can help me. I won't bother repeating myself as you can follow the posting below. The modified file is attached. My problem now is I have the right number of legend boxes, but the colours are wrong A rapid response would be greatly appreciated Cheers Paul Link to comment Share on other sites More sharing options...
Software FX Posted February 28, 2002 Report Share Posted February 28, 2002 The legend box code assumes 1 label per point, in order to paint a color box in it we use the color array as a 1-dimensional array so in your case we are picking the wrong color (it would work if your chart had 1 series). Your previous code cfxChart1.Legend(aLegends(nCount))=aPeriodNames(nCount) would give you the right colors but we limit the number of labels we paint the legend box to the number of points in the chart (that is why you only get two labels instead of 4). To workaround these issues you will have to use the Series Legend instead of Legend. We do not limit the number of labels painted in your series legend so it works fine. These are the code changes you will have to make At the end of GMTColour (Replace Legend with SerLeg and remove the division by numseries) for nCount=0 to UBound(aPeriodNames) cfxChart1.SerLeg(aLegends(nCount))=aPeriodNames(nCount) next In setBasicChartData (Replace LegendBox with SerLegBox and comment out the line that set the first series legend) ' cfxChart1.SerLeg(0)="Profile" cfxChart1.SerLegBoxObj.Docked = 258 cfxChart1.SerLegBoxObj.SkipEmpty=True cfxChart1.SerLegBoxObj.docked=TGFP_BOTTOM cfxChart1.SerLegBox = True I did not check the tooltip of the points which is the only thing that could get affected by this change but I think these changes will get you the chart you want. -- Regards JC Software FX Support "Paul Saxton" <paul.saxton@stcenergy.com> wrote in message news:W1EOTfDwBHA.1412@webserver1.softwarefx.com... > Hello! > > If you follow my posting yesterday (Problem Producing A Legend Box) you will > see that I am still having problems. As Chris suggested, I am now asking > anyone else, especially those at Software FX, can help me. I won't bother > repeating myself as you can follow the posting below. The modified file is > attached. My problem now is I have the right number of legend boxes, but > the colours are wrong > > A rapid response would be greatly appreciated > > Cheers > > Paul > > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.