Skip to content

Histogram #2548

Answered by texodus
nikolhaas65 asked this question in Q&A
Feb 28, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You can create a histogram by selecting an "X Bar" or "Y Bar" chart with your desired column in group_by field, and as (any) one column selected in the columns field with an aggregate of "count". You can combine this with an expression column with the bucket() function as well, as in this superstore View config:

{
    "plugin": "X Bar",
    "group_by": [
        "Sales Bucket"
    ],
    "columns": [
        "Sales"
    ],
    "expressions": {
        "Sales Bucket": "bucket(\"Sales\",100)"
    },
    "aggregates": {"Sales": "count"}
}
histogram.mov

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nikolhaas65
Comment options

Answer selected by timkpaine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants