Jump to content
Software FX Community

AlexYue

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by AlexYue

  1. Hello all!

    I was hoping I could get some guidance on working with multiple series in a map.  The problem I am trying to tackle is I have an svg file with a couple states broken out by counties (let's say NY and NJ).  I want to color the NY counties with one set of conditional attributes and NJ counties with another set of conditional attributes.

    Looking through the forums, it seems that I will want to use the Series property to achieve this.  Only problem is, I haven't been able to figure out how to get this to work.  I see that the conditional attributes has a Series property on it, so I am assuming it should be possible.  Here is my setup:

    Datasource is an ADO datatable with 3 columns - KeyLabelColumn, ValueColumn, SeriesColumn (I assume I need this series column to differentiate between the 2 states).Let's say I have a data table called "dt" populated with the following data (this is 1 datatable that has data for both states):

    Key Label, Value, Series

    NY001, 20, 1NY002, 102, 1NJ001, 300, 2NJ003, 70, 2

     I am trying to create the map like this:

    Map m = new Map(); m.DataSource = dt;m.DataType[0] = SoftwareFX.ChartFX.DataType.Label;m.DataType[1] = SoftwareFX.ChartFX.DataType.Value;m.DataType[2] = SoftwareFX.ChartFX.DataType.Series;

     

    m.ConditionalAttributes[0].Series = 1;m.ConditionalAttributes[0].Color = Color.Azure;m.ConditionalAttributes[0].Condition.To = 100;m.ConditionalAttributes[0].Legend = "NY Data";

    m.ConditionalAttributes[1].Series = 2;m.ConditionalAttributes[1].Color = Color.Black;m.ConditionalAttributes[1].Condition.To = 290;m.ConditionalAttributes[1].Legend = "NJ Data";

    When something like this is run, I get the sections on both states colored as the same color.  I seem to be missing something that is assigning the series data to the map.  Any help out there?  If this isn't clear, I can try to explain it a little better.  Thanks in advance for your help!

     Alex

×
×
  • Create New...