A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/sqlpage/SQLPage/discussions/930 below:

Charts sorting and colors · sqlpage/SQLPage · Discussion #930 · GitHub

Skip to content Navigation Menu Search code, repositories, users, issues, pull requests...

Saved searches Use saved searches to filter your results more quickly

Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert Charts sorting and colors #930

Jun 2, 2025 · 1 comments · 1 reply

{{actor}} deleted this content .

-

How do I achieve sorting charts as defined and how set individuell color for each item.

Example:

select
    'chart'             as component,
    'bar'               as type,
    TRUE                as labels;
select
   'item1'  as label,
   10       as value;
select 
   'item2'  as label,
   20       as value;
select
   'item10' as label,
   21       as value;

As you see item10 is before item2 after rendered but after item2 (as I want) in the code.

Second Question is: I wan't all items to have different color.

Any ideas?

Beta Was this translation helpful? Give feedback.

You must be logged in to vote

-

Hello !

We should definitely add an example for that to the documentation. Here is how you can achieve it:

select
    'chart'             as component,
    'bar'               as type,
    TRUE                as stacked;
select
   'item 01'  as series,
   'item 01'  as label,
   10       as value;
select 
   'item 02'  as series,
   'item 02'  as label,
   20       as value;
select
   'item 10' as series,
   'item 10' as label,
   21       as value;

I zero-padded item numbers in order for the alphabetic ordering to match what you would expect.

Beta Was this translation helpful? Give feedback.

You must be logged in to vote

1 reply

-

The reordering of values was introduced by mistake in a previous version, and is fixed in v0.35.2, released just now :)

Beta Was this translation helpful? Give feedback.

Heading

Bold

Italic

Quote

Code

Link

Numbered list

Unordered list

Task list

Attach files

Mention

Reference

Menu reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4