10 Replies Latest reply on Apr 21, 2017 4:56 AM by Milan Patel

    Color Code Change for legends

    Milan Patel

      Hello,

       

      I have tableau desktop 10.0 installed on my machine. I create dashboard on my desktop and publish it to Tableau online which is 10.2. The problem is, when i upload the workbook on tableau online, the color code which i applied in Tableau desktop are not there on Tableau online version when i check the published version. I tried editing them directly in Tableau online but when I save changes and see it, it revert back to the wrong color codes.

       

      Is there any solution for this?

        • 1. Re: Color Code Change for legends
          Mark Fraser

          linking to this thread... 工作簿发布后颜色失真,变色

          Milan, check out my answer in this thread ^^

          • 3. Re: Color Code Change for legends
            Milan Patel

            Thanks mark for sparing time on this. Well, On a company owned machine it is difficult to upgrade the version on your own. You have to go through various approvals to get it done. And this version issue is causing our deliverables late. Anyway, I will get in touch with the IT.

            • 4. Re: Color Code Change for legends
              Mark Fraser

              Hi Milan

               

              Understand your pain... its not always quite as easy as simply upgrading... its not always in your direct control

              I copied in Dmitry in the hope that he can offer some additional/ alternative advice

               

              best of luck, hope you can get it solved!

              • 5. Re: Color Code Change for legends
                Dmitry Chirkov

                Milan, what sort of dimension are you using for color?

                1) Is it a string?

                2) Is it coming from the database directly?

                3) Is it a calculation or a group?

                4) What version of Desktop are you using? 10.0.what?

                • 6. Re: Color Code Change for legends
                  Milan Patel

                  Hi Dmitry,

                   

                  Answering your questions,

                   

                  1) Is it a string?

                       Well, original field is in numeric format and then we create a calculated field from that (i.e When 1 Then "ABC") and use that calculated field.

                   

                  2) Is it coming from the database directly?

                       No, we create a calculated field to assign a name to the numeric value which is coming from the database directly.

                   

                  3) Is it a calculation or a group?

                       Calculation.

                  4) What version of Desktop are you using? 10.0.what?

                       10.0.1 (32 Bit)

                   

                  Thank you,

                  Milan

                  • 7. Re: Color Code Change for legends
                    Dmitry Chirkov

                    Symptoms are there but need to double-check why it's not fixed via web edit.

                    I'd love to take a look at the workbook's XML but if you can't send it - can you locate the part that specifies color assignments? Preferably, grab it from downloaded edited workbook.

                    I'd like to see if we store value-color mapping twice since I've seen that and not sure if that was addressed properly.

                    • 8. Re: Color Code Change for legends
                      Milan Patel

                      Hi Dmitry,

                       

                      Could you guide me how to get XML data from tableau workbook? Also, let me know, you need XML of which workbook? The one which I edited online? That would not be possible I believe because Online 10.2 version file will not be compatible with my Tableau desktop 10.0.

                       

                      Please correct me if I understood it differently.

                       

                      Thanks,

                      Milan

                      • 9. Re: Color Code Change for legends
                        Dmitry Chirkov

                        Steps:

                        1. Download TWBX from Online
                        2. Change extension from TWBX to ZIP
                        3. Inside archive there will be a TWB file - extract it
                        4. Open TWB file in Notepad
                        5. Find a section like this and paste it here:

                         

                                <style-rule element='mark'>

                                  <encoding attr='color' field='[none:Calculation_2999186312478834688:nk]' type='palette'>

                                    <map to='#edc948'>

                                      <bucket>&quot;VALUE_01&quot;</bucket>

                                    </map>

                                    <map to='#ff9da7'>

                                      <bucket>&quot;VALUE_02&quot;</bucket>

                                    </map>

                                  </encoding>

                                </style-rule>

                        1 of 1 people found this helpful
                        • 10. Re: Color Code Change for legends
                          Milan Patel

                          Thank you for guiding, Dmitry. Here you go!

                           

                          </encoding>

                                    <encoding attr='color' field='[none:Carrier 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (copy):nk]' palette='tableau20_10_0' type='palette'>

                                      <map to='#aec7e8'>

                                        <bucket>&quot;Carrier1&quot;</bucket>

                                      </map>

                                      <map to='#d62728'>

                                        <bucket>&quot;Carrier2&quot;</bucket>

                                      </map>

                                      <map to='#e377c2'>

                                        <bucket>&quot;Carrier3&quot;</bucket>

                                      </map>

                                      <map to='#ffdd71'>

                                        <bucket>&quot;Carrier4&quot;</bucket>

                                      </map>

                                    </encoding>

                                  </style-rule>