Code Monkey home page Code Monkey logo

Comments (5)

zebulon2 avatar zebulon2 commented on July 17, 2024

I answer to myself: I added:
self.jschart += "chart.xScale(d3.scale.log());"
to NVD3Chart.py in python-nvd3 code, and this works quite well! I just need to change the axis ticks formatting to prevent the X axis to be overwhelmed with labels.
I may be able to submit a patch later, but my programming may be a bit rusty and not very high standard.

from django-nvd3.

areski avatar areski commented on July 17, 2024

Can you show us an example with nvd3 ?

from django-nvd3.

zebulon2 avatar zebulon2 commented on July 17, 2024

Do you mean a screenshot? See below:

nvd3_log

This was obtained adding in NVD3Chart.py :
self.jschart += stab(2)+"chart.xScale(d3.scale.log());\n"####
self.jschart += stab(2)+"chart.xAxis.tickValues([0.001, 0.003, 0.01, 0.03, 0.1, 0.3, 1, 3, 10, 30]);\n"####

Now of course this is only a proof-of-concept. I need to add the code correctly and edit both python-nvd3 and django-nvd3.

I also realised this is similar to qdoolaeg request here: areski/python-nvd3#13
He proposes the more generic solution where any attribute/value could be passed to chart. It is nice, because it would allow users to add non yet supported attributes for django-nvd3.

I can fork your repository and provide a pull request then.

from django-nvd3.

zebulon2 avatar zebulon2 commented on July 17, 2024

I have sent pull requests for python-nvd3 and django-nvd3. Please let me know what you think.

from django-nvd3.

areski avatar areski commented on July 17, 2024

I suppose we can close this one now?

from django-nvd3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.