Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8968435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:27:11+00:00 2026-06-15T17:27:11+00:00

I am trying to create a d3 chart with logarithmic scale(1,10,100..). I used their

  • 0

I am trying to create a d3 chart with logarithmic scale(1,10,100..). I used their functions and call but not much help.

var x = d3.scale.log()
    .domain([1,10])
    .range([0, width]);

var y = d3.scale.log()
    .domain([1,10])
    .range([height, 0]);

var color = d3.scale.category10();

var xAxis = d3.svg.axis()
    .scale(x)   
    .orient("bottom");

var yAxis = d3.svg.axis()
    .scale(y)   
    .orient("left");

var line = d3.svg.line()
    .x(function(d) { return x(d[xAxxis]); })
    .y(function(d) { return y(d[yAxxis]); });
var svg = d3.select("#"+this.divid).append("svg")
    .attr("width", width + margin.left + margin.right)
    .attr("height", height + margin.top + margin.bottom)
  .append("g")
    .attr("transform", "translate(" + margin.left + "," + margin.top + ")");

x.domain(d3.extent(totalArray, function(d) { return d[xAxxis]; })).nice(); 
y.domain(d3.extent(totalArray, function(d) { return d[yAxxis]; })).nice(); 

Is there any way i can create the axis with 1e+0,10e+0,100e+0 rather than 1e+0,2e+0,3e+0

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:27:12+00:00Added an answer on June 15, 2026 at 5:27 pm

    You can control which labels the axis renders using either the tick() or tickValues() method, depending on how you want to go about it. See the d3’s API documentation for more details. Also, note that a log scale’s tick() method takes no arguments, so you’ll likely have to use tickValues() though the other method might come in handy for formatting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a Google line chart using their API and JSON.
I'm trying to create a stacked bar chart , But I'm getting an error
I'm trying to draw a Google bar chart with a logarithmic scale. However, it
I'm trying to create a visualized chart using Jquery Highcharts plug-in. But I'm unable
I'm trying to create a chart using data from my database calling json, but
I am trying to create some JSON to be used for displaying a chart
I am trying to create a simple table and chart for my data but
I'm trying to create a pie-chart, like here , but the legend and the
I am trying to create a stacked bar chart with multiple variables, but I
I am trying to create a chart which has both actual data and the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.