Gramex 1.49 Release Notes

The Vega chart gallery has a wide collection of charts that you can copy-paste from.

Vega chart gallery

The gallery current has:

Better gramex init

gramex init adds a login page, better default layouts, and an opinionated file structure:

g1 animated templates

g1 0.12 supports template animation via virtualdom:

Animated templates

<script type="text/html" data-engine="vdom">
  <div
    class="red-ball"
    style="transition: all 1s ease;margin-left:<%= x %>px"
  ></div>
</script>
<script>
  var x = 300;
  // Re-rendering the template just updates the changed styles / attributes.
  // DOM elements are not deleted. Just updated.
  setInterval(function () {
    $('script[type="text/html"]').template({ x: x });
    x = 300 - x;
  }, 2000);
</script>

g1 0.12 supports search as you type:

Search demo

<input
  type="search"
  data-search="@text"
  data-bs-target=".list li"
  data-hide-class="d-none"
/>
<ul class="list">
  <li>First item</li>
  <li>Second item</li>
  <li>Third item</li>
</ul>
<script>
  $("body").search();
</script>

Bootstrap 4.2

Gramex UI components now use Bootstrap 4.2 instead of Bootstrap 4.1. This is backward compatible. It features spinners, switches, toast notifications and new utility classes like .font-weight-lighter, .text-decoration-none, negative margins like .m-n3, etc.

Bugfixes

Stats

Upgrade

To upgrade Gramex, run:

pip install --verbose gramex==1.49
gramex setup --all                      # Set up UI components, puppeteer, etc