Skip to content

can we format time into 24 hours for displaying in x-axis ticks in version 3.13.0? #3614

@pradeepshrestha14

Description

@pradeepshrestha14

version of PlottableJS used is => version 3.13.0
can we format time into 24 hours for displaying in x-axis ticks ?

my code looks like :

/* ****************************************** Scale & Axis ****************************************** */
xScale = new Plottable.Scales.Time()
.domain(minXrange);
xAxis = new Plottable.Axes.Time(xScale, "bottom")
.addClass('logpoint-default-x-axis');

	// Linear scale or Modified-Log Scale
	if (this.getProvider().getScale() == "log") {
		yScale = new Plottable.Scales.ModifiedLog();
	}else if (this.getProvider().getScale() == "linear") {
		yScale = new Plottable.Scales.Linear();
	}

	yAxis = new Plottable.Axes.Numeric(yScale, "left")
        .innerTickLength(0)
        .endTickLength(0)
        /*.formatter(function(y) {
            return '';
        })*/
        .addClass('logpoint-default-y-axis')
        .formatter(new Plottable.Formatters.shortScale());
	/* ************

At present, 12 hour time format is being displayed in ticks of the x-axis.
I want to reformat that time to 24 hour format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions