SQL layer wont ORDER BY in CARTO VLUploading in Carto changes column orderCarto Editor SQLcarto clusters +...

How to play songs that contain one guitar when we have two or more guitarists?

How do I write a maintainable, fast, compile-time bit-mask in C++?

The Late Queen Gives in to Remorse - Reverse Hangman

Why are `&array` and `array` pointing to the same address?

How can I portray body horror and still be sensitive to people with disabilities?

Arizona laws regarding ownership of ground glassware for chemistry usage

How can I differentiate duration vs starting time

Build ASCII Podiums

Multiplying elements of a list

Does the Holy Ark weight 4 tons?

What does @ mean in a hostname in DNS configuration?

Which was the first story to feature space elevators?

Ramanujan's radical and how we define an infinite nested radical

Coworker is trying to get me to sign his petition to run for office. How to decline politely?

Badly designed reimbursement form. What does that say about the company?

Are all power cords made equal?

Why would you use 2 alternate layout buttons instead of 1, when only one can be selected at once

How to achieve physical gender equality?

Have any astronauts or cosmonauts died in space?

Is it ethical to apply for a job on someone's behalf?

Why Third 'Reich'? Why is 'reich' not translated when 'third' is? What is the English synonym of reich?

How can I create unencrypted addresses?

Sauna: Wood does not feel so hot

Almost normal subgroups: Is there any notion which is weaker than normal subgroup?



SQL layer wont ORDER BY in CARTO VL


Uploading in Carto changes column orderCarto Editor SQLcarto clusters + sqlUsing CARTO VL on local Ubuntu installationWhere to find datasets for creating CARTO VL maps?Adding labels to a Carto VL visualization?How to run basic setup CARTO VL?CARTO Airship widget default textHow to reverse quantile color palette with CARTO VLUpdating legend (when active layer is changed) in CARTO VL?













0















I have a dataset that shows the borehole yield for fractured aquifers in South Africa. Using the "yield_ls" column, my CARTO VL legend looks like this (notice how the 4th item should be the first).



const aquiferViz = new carto.Viz(`
color: ramp($yield_ls, teal)
strokeColor: rgba(0,0,0,0.3)
strokeWidth: 1
`);


enter image description here



I noticed that each legend item is assigned an ID column in the database ("sayld_id") starting from 6 to 10. Therefore if this database is ordered by the sayld_id ASC, then the yield_ls features go into a logical order. I tested this using the following SQL command in my CARTO dataset:



SELECT *
FROM fractured
ORDER BY sayld_id ASC


enter image description here



I then tried to do this when adding my the layer to a CARTO VL map using:



const fracturedSource = new carto.source.SQL(`
SELECT *
FROM fractured
ORDER BY sayld_id ASC
`);


But the legend remains the same as before. Is there a better way to correctly arrange the legend, or possibly move an item up or down in the legend order?










share|improve this question





























    0















    I have a dataset that shows the borehole yield for fractured aquifers in South Africa. Using the "yield_ls" column, my CARTO VL legend looks like this (notice how the 4th item should be the first).



    const aquiferViz = new carto.Viz(`
    color: ramp($yield_ls, teal)
    strokeColor: rgba(0,0,0,0.3)
    strokeWidth: 1
    `);


    enter image description here



    I noticed that each legend item is assigned an ID column in the database ("sayld_id") starting from 6 to 10. Therefore if this database is ordered by the sayld_id ASC, then the yield_ls features go into a logical order. I tested this using the following SQL command in my CARTO dataset:



    SELECT *
    FROM fractured
    ORDER BY sayld_id ASC


    enter image description here



    I then tried to do this when adding my the layer to a CARTO VL map using:



    const fracturedSource = new carto.source.SQL(`
    SELECT *
    FROM fractured
    ORDER BY sayld_id ASC
    `);


    But the legend remains the same as before. Is there a better way to correctly arrange the legend, or possibly move an item up or down in the legend order?










    share|improve this question



























      0












      0








      0








      I have a dataset that shows the borehole yield for fractured aquifers in South Africa. Using the "yield_ls" column, my CARTO VL legend looks like this (notice how the 4th item should be the first).



      const aquiferViz = new carto.Viz(`
      color: ramp($yield_ls, teal)
      strokeColor: rgba(0,0,0,0.3)
      strokeWidth: 1
      `);


      enter image description here



      I noticed that each legend item is assigned an ID column in the database ("sayld_id") starting from 6 to 10. Therefore if this database is ordered by the sayld_id ASC, then the yield_ls features go into a logical order. I tested this using the following SQL command in my CARTO dataset:



      SELECT *
      FROM fractured
      ORDER BY sayld_id ASC


      enter image description here



      I then tried to do this when adding my the layer to a CARTO VL map using:



      const fracturedSource = new carto.source.SQL(`
      SELECT *
      FROM fractured
      ORDER BY sayld_id ASC
      `);


      But the legend remains the same as before. Is there a better way to correctly arrange the legend, or possibly move an item up or down in the legend order?










      share|improve this question
















      I have a dataset that shows the borehole yield for fractured aquifers in South Africa. Using the "yield_ls" column, my CARTO VL legend looks like this (notice how the 4th item should be the first).



      const aquiferViz = new carto.Viz(`
      color: ramp($yield_ls, teal)
      strokeColor: rgba(0,0,0,0.3)
      strokeWidth: 1
      `);


      enter image description here



      I noticed that each legend item is assigned an ID column in the database ("sayld_id") starting from 6 to 10. Therefore if this database is ordered by the sayld_id ASC, then the yield_ls features go into a logical order. I tested this using the following SQL command in my CARTO dataset:



      SELECT *
      FROM fractured
      ORDER BY sayld_id ASC


      enter image description here



      I then tried to do this when adding my the layer to a CARTO VL map using:



      const fracturedSource = new carto.source.SQL(`
      SELECT *
      FROM fractured
      ORDER BY sayld_id ASC
      `);


      But the legend remains the same as before. Is there a better way to correctly arrange the legend, or possibly move an item up or down in the legend order?







      carto spatial-database carto-vl






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 hours ago







      JohnGIS

















      asked 2 hours ago









      JohnGISJohnGIS

      747




      747






















          1 Answer
          1






          active

          oldest

          votes


















          0














          could you please share the full ramp expression you're using for the color property? Thanks!






          share|improve this answer
























          • Hey Elena. I have updated the original post to include the full ramp expression

            – JohnGIS
            2 hours ago











          • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

            – Dan C
            1 hour ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "79"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313092%2fsql-layer-wont-order-by-in-carto-vl%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          could you please share the full ramp expression you're using for the color property? Thanks!






          share|improve this answer
























          • Hey Elena. I have updated the original post to include the full ramp expression

            – JohnGIS
            2 hours ago











          • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

            – Dan C
            1 hour ago
















          0














          could you please share the full ramp expression you're using for the color property? Thanks!






          share|improve this answer
























          • Hey Elena. I have updated the original post to include the full ramp expression

            – JohnGIS
            2 hours ago











          • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

            – Dan C
            1 hour ago














          0












          0








          0







          could you please share the full ramp expression you're using for the color property? Thanks!






          share|improve this answer













          could you please share the full ramp expression you're using for the color property? Thanks!







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 hours ago









          Elena TorróElena Torró

          912




          912













          • Hey Elena. I have updated the original post to include the full ramp expression

            – JohnGIS
            2 hours ago











          • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

            – Dan C
            1 hour ago



















          • Hey Elena. I have updated the original post to include the full ramp expression

            – JohnGIS
            2 hours ago











          • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

            – Dan C
            1 hour ago

















          Hey Elena. I have updated the original post to include the full ramp expression

          – JohnGIS
          2 hours ago





          Hey Elena. I have updated the original post to include the full ramp expression

          – JohnGIS
          2 hours ago













          This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

          – Dan C
          1 hour ago





          This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review

          – Dan C
          1 hour ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313092%2fsql-layer-wont-order-by-in-carto-vl%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Щит и меч (фильм) Содержание Названия серий | Сюжет |...

          is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

          Meter-Bus Содержание Параметры шины | Стандартизация |...