javascript - Dimple.js bar chart transitions including removed bars -


When a dimple bar chart changes new data with fewer or different bars, then on top of the bars being removed Due to the left side of the chart, stay for each other and for complete transition time.

Here is an example of a code, which rebuild the effect:

  var svg = dimple.newSvg ("# chartcontainer", 590, 400); Var = Figures = [[Animals: "Cats", Value: (Mathematics. Randem) * 1000000)}, {Animals: "Dogs", Value: (Math.Rendam) * 1000000)}, {Animals: "Mice" Price: (Math.Rendam) * 1000000), {Animals: "Rat", Value: (Math.Rendam) * 1000000)}, {Animal: "Cow", Price: (Math.Rendam) * 1000000)}] ; Var myChart = new dimple.chart (svg, data); MyChart.setBounds (60, 30, 510, 305) var x = myChart.addCategoryAxis ("x", "Animals"); X.addOrderRule (["cats", "dogs", "mice"]); MyChart.addMeasureAxis ("y", "value"); MyChart.addSeries (empty, dimple.plot.bar); MyChart.draw (); D3.select ("# btn"). On ("click", function () {myChart.data = [[animal: "cats", value: (antelope) * 1000000)}, {animal: "dog", value: (math.rendam * 1000000)}, {Animals: "Mice", Value: (Math.Rendam) * 1000000)}]; MyChart.draw (1000);});   

If you click on the button in the example, you will see the effect. Example:

(Dimension by answering John Keynander)

Is there any way to keep the bar removed out of the infection?

I have rewritten all transition codes for dimple v2.0, which I will release on Monday . I have just tried this example in 2nd edition and it looks a lot better.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -