rspencer1984 Report post Posted July 22, 2009 Hi Everyone, Basically Ism using the scatter graph, for charting X, Y coordinates. Now this is fine, I have several database driven area's with are retrieved and populated onto the chart, giving a chart as shown in the image ; Some of you may recognize the layout, those of you who do I take my hat off to you Basically the shapes are constructed from x y coordinates assigned to each. Each shape has a sperate dataset. My question; is it possible to have FusionCharts fill the shape backgrounds a certain colour? And also present a custom label within the shape? Thanks in advance guys, Ross Spencer Share this post Link to post Share on other sites
saptarshi Report post Posted July 23, 2009 Ross, First off, hats off to you. I had a hard time recognizing this chart as a scatter chart. We would love you to say how you went about making this. But I am afraid, there is no way to fill these shapes with a color or have a label placed inside each shape. Oh and welcome to the forum. Share this post Link to post Share on other sites
rspencer1984 Report post Posted July 23, 2009 (edited) Hi Saptarshi, The chart is generated in VB6; code listed below for anyone who wishes to replicate it... Public Function UPDATE_GRAPH() Dim xx, yy, xy As Double xy = 0.25 chartParameters = "ADJUSTDIV=0;showyaxisvalues=1;HLINES=0;VLINES=0;showlegend=0;palette=0;drawline=1;caption=LED BINNING MATRIX;yAxisName=Y Coordinates;xAxisName=X Coordinates;xAxisMaxValue=0.51;xAxisMinValue=0.26;yaxisminvalue=0.24;yAxisMaxValue=0.51" Form5.FusionCharts1.chartType = scatter Do Until xy = 0.51 'This process populates the data specifications to the graph If xy > 0.51 Then Exit Do Call Form5.FusionCharts1.Data.addCategory(xy, "Y=" & xy) xy = xy + 0.01 Loop X = 1 Do Until X = bincount 'This process populates the x,y coordinaes for each category 'which is sql queried from a back end access database. 'X1, X2, X3, X4 and Y1, Y2, Y3, Y4 are data arrays, and this process 'loops through the arrays populating the data into the graph datasets Call Form5.FusionCharts1.Data.addDataset(BINNAME(X), "showlabel=0;DRAWANCHORS=1;drawline=1;linethickness=1;linecolor=ff000f;anchorsides=4;anchorradius=1;anchorbgcolor='H000000FF'") Call Form5.FusionCharts1.Data.addChartData(X1(X), "Y=" & Y1(X)) Call Form5.FusionCharts1.Data.addChartData(X2(X), "Y=" & Y2(X)) Call Form5.FusionCharts1.Data.addChartData(X4(X), "Y=" & Y4(X)) Call Form5.FusionCharts1.Data.addChartData(X3(X), "Y=" & Y3(X)) Call Form5.FusionCharts1.Data.addChartData(X1(X), "Y=" & Y1(X)) X = X + 1 Loop Call Form5.FusionCharts1.Data.setChartParams(chartParameters) Call Form5.FusionCharts1.RenderChart End Function The construct of the chart is a Colour Binning Chart, for categorising White Light into manageable sections. Basically we have a Light Chromaticity Meter which measures the X,Y coordinates of any given light source and feeds this information into the system. Which then processes it, and populates the coordinate point onto this graph. The operative can the assess if the product is suitable and which category to issue it to. My next question. I have found a work-around for having floating labels, simply by generating another dataset to create an invisible anchor on the graph, however when showvalue is on the display always reverts to displaying the actual value of the anchor, even when displayvalue="custom"...is this a bug? Or have I missed something? Code shown below for it; FusionCharts1.Data.addChartData(XValue, "Y=" & YValue,"displayvalue=text;showvalue=1") Happy Fusioncharting Thanks Edited July 23, 2009 by Guest Share this post Link to post Share on other sites