Ticket T293316
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Web - Choropleth Map colors are displayed incorrectly

Dashboard Choropleth Map does not update colors on build

created 9 years ago

I am currently working on a Choropleth map for a dashboard I am creating.

In the dashboard designer, I changed the Map's Value colors to 0=blue, 1=green, 2=yellow, and 3=red.
However, when I build the project, all of the colors were being displayed incorrectly. For example, if a State's value was 1, it should have been colored in green, however it was instead coloring in the state blue.

Below is the code for my map for the colors:

C#
customPalette1.Colors.Add(System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))))); customPalette1.Colors.Add(System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(175)))), ((int)(((byte)(80)))))); customPalette1.Colors.Add(System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(235)))), ((int)(((byte)(59)))))); customPalette1.Colors.Add(System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(67)))), ((int)(((byte)(54)))))); valueMap1.Palette = customPalette1; customScale1.IsPercent = false; customScale1.RangeStops.Add(0D); customScale1.RangeStops.Add(1D); customScale1.RangeStops.Add(2D); customScale1.RangeStops.Add(3D);

However, as I said when a State has a given value, it seems to subtract 1 and present that color instead (i.e: State value = 3, color should be red - however it displays Yellow).

Any help or guidance would be greatly appreciated.

-Patrick

Show previous comments (1)
PM PM
Patrick McHugh 9 years ago

    Hi Maxim,
    I have taken a screenshot of my map settings using the GUI.
    Since my post, I have removed line 1 and line 7 from the code above.
    As for valueMap1, here is the code that initializes it:

    C#
    DevExpress.DashboardCommon.ValueMap valueMap1 = new DevExpress.DashboardCommon.ValueMap(); And here is where I set the colors: valueMap1.Scale = customScale1; valueMap1.AddDataItem("Value", measure2);

    All of these were set when I used the dashboard designer's drag and drop features (the GUI)
    Thanks again,
    -Patrick

    DevExpress Support Team 9 years ago

      Thank you for your clarification. Just wanted to drop you a note to let you know that we need a bit more time to finish working on our answer to your inquiry.  Thanks so much for your patience.

      PM PM
      Patrick McHugh 9 years ago

        After taking a break and looking at it again, I think I realized that what RangeStops actually does.
        So if I have RangeStops(1), that essentially says that any number <1 will be marked. And for RangeStops(2), any number 1<=x<2 will be marked.
        I think this is what was confusing me the most, especially because the Dashboard designer displays the information one way and in the browser it is displayed the way I described above.

        Answers approved by DevExpress Support

        created 9 years ago

        Hi Patrick,

        Thank you for the update. Having examined this issue we found that colors are not applied correctly to the Choropleth Map dashboard item. I have registered a separate ticket in this regard:

        Web - Choropleth Map colors are displayed incorrectly.

        We will continue working on this issue and will notify you once we make any progress. Your patience is appreciated.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.