sangeethailango

sangeethailango

How to set range for y axis using contex library?

Hello fellow learners.

I am creating charts in my elixir project using the Contex library (Contex — ContEx v0.5.0).

I have created a bar chart. In that chart, I want to set the highest tick value of the y-axis to 56. I have used tick_positions to do it. But my chart looks messy.

This is my chart. I just used tick_positions so that I could set the highest y-axis value. I have also found that the range in context is used to set the range axis. But I don’t how to do it in my code. So how should I use range in my code to set range for my y-axis?

Below is the option for the Barchart

      options = [
        custom_value_scale:
          Contex.ContinuousLogScale.new(
            domain: {0, 56},
            tick_positions: [5, 10, 15, 20, 40, 56],
            negative_numbers: :mask
          ),
          colour_palette: ["ffdfae"],
          data_labels: false,
        ]

Even if the values for the bars are less than 56, I need the 56 to have appeared.

Where Next?

Popular in Questions Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130286 1222
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement