Replacing the X-axis tick #208

Open
njss opened this Issue Feb 27, 2013 · 0 comments

Projects

None yet

1 participant

@njss
njss commented Feb 27, 2013

NOTE: I am using the Interactive Real-Time Data example
I would like to allow the user to select different types of chart representations but...
I would like to remove the X axis (of type Time) in order to replace it by a new axis (of type formatKMBT)

example:
I need to replace this...(based on the user choices)
xAxis = new Rickshaw.Graph.Axis.Time({
graph: graph,
//timeUnit: year,
ticksTreatment: ticksTreatment
});

by this:

xAxis = new Rickshaw.Graph.Axis.X ({
            graph: graph,
            tickFormat: Rickshaw.Fixtures.Number.formatKMBT,             
            });                              

one bad way right now: was to recreate the chart, but everytime I replace the chart
I get a weird effect on Chrome (Firefox ok).

I search for the #chart div (using jquery) like this:
var chartContainer = $("#chart");
chartContainer.empty();

any help on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment