Coder Social home page Coder Social logo

Date format about lavacharts HOT 7 CLOSED

kevinkhill avatar kevinkhill commented on May 11, 2024
Date format

from lavacharts.

Comments (7)

kevinkhill avatar kevinkhill commented on May 11, 2024

I'm fairly certain Google Charts allows that, I don't think I implemented that in the datatable configuration yet. I will add it to my list of to-dos for V2 (close to completion)

from lavacharts.

lvian avatar lvian commented on May 11, 2024

Thanks, I was really happy when I found LavaCharts and I'm looking forward for V2,

from lavacharts.

kevinkhill avatar kevinkhill commented on May 11, 2024

Thank you kindly internet stranger :) I've been researching Google's method
of formatting dates and working on an implementation
On Aug 15, 2014 11:06 AM, "Leandro Vian" [email protected] wrote:

Thanks, I was really happy when I found LavaCharts and I'm looking forward
for V2,


Reply to this email directly or view it on GitHub
#7 (comment).

from lavacharts.

kevinkhill avatar kevinkhill commented on May 11, 2024

Actually, you should already be able to format the dates of the horizontal axis. (I forgot)
Create an array to configure the chart. Then using an hAxis object, Such as

$config = array(
    'hAxis' => Lava::hAxis(array(
        'format' => 'YY/MM/DD' 
    )) 
);

Then pass this array into the setConfig method of the chart.

from lavacharts.

lvian avatar lvian commented on May 11, 2024

Thanks Kevin, worked great.

Managed to achieve the format I wanted with your code and a quick check at http://icu-project.org/apiref/icu4c/classSimpleDateFormat.html#_details

$config = array(
    'hAxis' => Lava::hAxis(array(
        'format' => 'd/MM/yyyy' 
    )) 
);

from lavacharts.

lvian avatar lvian commented on May 11, 2024

By the way, is it possible to do something similar with the dates displayed inside the tooltips?
Broke my head for a while trying to find a way, most answers I found were related with the use of dateFormat but I failled to realize where I should put it inside lavacharts code in order to test :)

from lavacharts.

kevinkhill avatar kevinkhill commented on May 11, 2024

If you take a peek at the v2.0 branch, or the releases section on Github, I
actually just finished implementing dateFormat and numberFormat :) I also
have a rudimentary implementation of chart events in the works.

The v2.0 branch is stable, I think I have the new API nailed down, (don't
use it in production obviously) but you can play with it if you want
On Aug 18, 2014 4:52 PM, "Leandro Vian" [email protected] wrote:

By the way, is it possible to do something similar with the dates
displayed inside the tooltips?
Broke my head for a while trying to find a way, most answers I found were
related with the use of dateFormat but I failled to realize where I should
put it inside lavacharts code in order to test :)


Reply to this email directly or view it on GitHub
#7 (comment).

from lavacharts.

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.