User (Legacy) Posted December 22, 2003 Report Share Posted December 22, 2003 CHART FX INTERNET EDITION 2000 Server version 4.5.15.2 Codebase=/download/CfxIEAx.cab#Version=4,5,15,2 Codebase=/download/CfxIEAx.cab#Version=5,5,3,0 PluginVersion=4,5,15,2 I have an opportunity to use a pyramid chart for the first time. For testing and development purposes, I am supplying data via the following chart.OpenDataEx COD_VALUES,1,2 ThisSerie=0 chart.Value(0) = .5345 chart.Value(1) = .4562 CloseData COD_VALUES I am also implicitly setting the legend values as such chart.legend(0) = "% of responses equal or below breakpoint " chart.legend(1) = "% of responses above breakpoint " And I am showing the point labels as their values with the following chart.PointLabels = TRUE I have also experimating with formating the point labels with the event Sub ChartFX1_GetPointLabel(nSeries, nPoint, nRes ) My problem ariaes when I want to specifiy the 2 disticnt colors for the 2 points in my single series chart.MultipleColors = true chart.OpenDataEx 3, 2, 0 chart.Color(1) =RGB(184,156,20) chart.Color(2) =RGB(113,108,149) chart.CloseData 3 This does change the colors but the values(string) that I set for my legend now show up as point labels. I can get the colors want and values to show as point labels if i do not set the legend values. I have tried different sequences for these properties but have not found a solution. Any help would be apprciated Link to comment Share on other sites More sharing options...
Software FX Posted December 22, 2003 Report Share Posted December 22, 2003 Whenever you set labels to a chart (Legend property) they will show in the Pyramid chart. This is completely independent of the color settings. If you display the legend box (LegendBox = true) then the labels will disappear from the chart and show up in the legend box. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted December 22, 2003 Author Report Share Posted December 22, 2003 I am enclosing the exact code for the situation I have described because I would guess there is some parallel or contradictory command/value being set . In this example, when the code to set the color of the series points is commented out, I get the formatted value returned as point labels and the legend information in the indicated bottom position. When I remove the comment markers for the aforementioned code, I first get en error in the VB script where it tries to format a string (I.e. chart.legend(0) = "% of responses equal or below breakpoint " ) and when I let it run without stopping for those errors, the legend text is now showing as the label. If I re-comment out the color code, the values .5345 and .4562 return as formatted lables. return <HTML> <HEAD> <BODY> <SCIPT LANGUAGE= "VBScript> <!-- Sub ChartFX1_GetPointLabel(nSeries, nPoint, nRes ) Dim d d = ChartFX1.HText ChartFX1.hText =FormatPercent(d,2) ' percent - 0.00% ChartFX1.ReturnValue = 1 End Sub --> </SCRIPT> <% Set chart = Server.CreateObject("ChartFX.WebServer") chart.RgbBk = RGB(255,255,255) chart.Axis(AXIS_Y).Notify = True chart.Gallery = PYRAMID chart.Chart3D = False chart.LeftGap=60 chart.Title(CHART_TOPTIT) = sTitle & " 13 Month Trend" chart.Fonts(CHART_TOPTIT) = chart.Fonts(CHART_TOPTIT) Or CF_ARIAL Or CF_BOLD Or 9 chart.OpenDataEx COD_VALUES,1,2 ThisSerie=0 chart.Value(0) = .5345 chart.Value(1) = .4562 ' CloseData COD_VALUES chart.LegendBox = TRUE chart.LegendBoxObj.Visible = True chart.LegendBoxObj.Docked = TGFP_BOTTOM chart.LegendBoxObj.Left = 40 chart.LegendBoxObj.font.name = "arial" chart.LegendBoxObj.font.Size = 7 ' Commented out block ' ' chart.MultipleColors = true ' chart.OpenDataEx 3, 2, 0 ' chart.Color(1) =RGB(184,156,20) ' chart.Color(2) =RGB(113,108,149) ' chart.CloseData 3 chart.RGBBk = RGB(255,255,255) chart.RGB2DBk = CHART_TRANSPARENT Or RGB(255,255,255) chart.LegendBoxObj.BkColor = CHART_TRANSPARENT Or RGB(255,255,255) chart.BorderStyle = 0 chart.PointLabels = TRUE chart.legend(0) = "% of responses equal or below breakpoint " chart.legend(1) = "% of responses above breakpoint " %> <%=chart.GetHtmlTag("200","180","Auto","ChartFX1")%> "SoftwareFX Support" <support@softwarefx.com> wrote in message news:yvgq$YMyDHA.3072@WEBSERVER1... > Whenever you set labels to a chart (Legend property) they will show in the > Pyramid chart. This is completely independent of the color settings. > > If you display the legend box (LegendBox = true) then the labels will > disappear from the chart and show up in the legend box. > > -- > FP > Software FX, Inc. > > Link to comment Share on other sites More sharing options...
Software FX Posted December 23, 2003 Report Share Posted December 23, 2003 That's because of this line: chart.MultipleColors = true Setting multiple color causes the legend to be inaccurate as different colors can be assigned to the same point for different series. Simply take out that line and you will achieve what you are looking for. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.