DSweet Posted August 6, 2010 Share Posted August 6, 2010 When you fill charting information (specifically a pie chart) with data from a "flat data file", can you control what values actually show on the chart? For example, a "full pie" chart would be made up of 6 slices: var1, var2, var3, var4, var5, and var6 just to make it simple. If Record1 shows all six entries then use all six slices in the chart with all six entries as a legend. However Record2 shows zero values for var2 and var5, the you only show slices for var1, var3, var4, and var6 in the chart and the legend (var2 and var5 are dropped from both). Is there some way of coding ... if (Field("Var2") > 0) { use this variable in chart; } ... I've not done too much chart and table programming, but we have a new client that will be wanting us to use features like this extensively. Would like to get some ideas on how to go about it. . Link to comment Share on other sites More sharing options...
Dan Korn Posted August 9, 2010 Share Posted August 9, 2010 You're just building up the chart data with a rule anyway, right? So only put as much data in the chart as you're actually using. For instance: for (var i = 1; i <= 6; i++) { if (Int(Field("Var" + i))) result += "<row><cell>" + Field("Var_Desc" + i) + "<cell>" + Int(Field("Var" + i)); } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.