keen / keen-dataviz.js

Data Visualization Charting Library
MIT License
223 stars 49 forks source link

Stacked bar graph for percentage always shown 100% #240

Open Nehasolanki30 opened 3 years ago

Nehasolanki30 commented 3 years ago

Stacked bar graph for percentage is always shown 100% even if total count is less than 100

Screenshot from 2021-05-26 15-36-34

values for march 25 to 26

[{ product.name: "apps", result: 34 }, { product.name: "books", result: 15 }, { product.name: "games", result: 18 }, { product.name: "sounds", result: 14 }]

maciejrybaniec commented 3 years ago

Hi @Nehasolanki30,

Could You please provide more details about the issue - and what is expected behavior from Your point of view ?

Based on my knowledge for stacked bar chart - for each interval the sum of data series values equals 100%. So for data presented below we've got value -> 81 which is a 100% for interval connected with that data.

[{
  product.name: "apps",
  result: 34
}, {
  product.name: "books",
  result: 15
}, {
  product.name: "games",
  result: 18
}, {
  product.name: "sounds",
  result: 14
}]