How to add scroll to x-axis displaying date in Charticulator?
I am trying to make a specific form of gantt-chart in Charticulator for display in Power BI. The diagram consists of:
X-axis: Start datetime for the assignment Y-axis: group member Width of mark: Number of minutes assignment is estimated for Color of mark: Type of assignment
Here's the problem: As soon as I tick off the "Allow Scroll" for X-axis, all data marks disappears, and the settings for the axis changes to seemingly only have data for one day. The glyph also becomes blank with the text "to edit this glyph please add a plot segment to it", even though I just had a plot segment before selecting "Add scroll". This is only a problem for data with datetime, not if I change it to a string, which unfortunately would create other issues.
Does anyone have a fix to create a x-axis with datetime with scroll?
do you know?
how many words do you know
See also questions close to this topic
-
mysql return 360 degrees returned with strengths
I have a table of wind directions and strengths over a 24 hour period, sample data at the bottom of this question.
only directions that have strengths are stored in the database, I'm currently using the following SQL:
SELECT winddirection, avespeed FROM wp_weather_data WHERE ID%10 = 0
what I would like to return is an entry for every degree (0 value for any degree not in the db) and where there are multiple entries for a given degree to only return the highest value. Oh, and they need to be in ascending order of degrees.
Is this possible?
This is so I can plot a wind distribution chart on a polar chat plugin in WordPress.
sample data returned from the above sql:
294 2 271 3 269 2 285 3 289 2 123 1 130 1 144 1 160 0 168 0 161 0 135 0 138 0 331 0 115 0 136 0 161 0 267 0 114 0 265 0 204 0 248 1 206 0 199 1 250 2 244 3 257 3 272 5 267 5 208 3 221 3 223 4 253 6 233 5
-
FusionCharts/FusionTime stepline chart leaves off data points and binning aggregation distorts the data
I'm trying to reproduce a Pillow app timeline chart using FusionTime. Pillow tracks sleep quality and the different sleep stages using Apple Watch. The following is an example chart:
From the app you can export a json file with the data points. For example:
"sleepStageDataPoints": [ { "stage": 1, "timeStamp": 673239278.32947648 },
`Stage legend: 0=Deep, 1=Light, 2=REM, 3=Awake
I import the data into mysql, converting the Unix time in the process. I also increment the stage number so that
Deep=1
, etc., because the axis would be 0 in FusionTime.So there is a start time and the level of the stage at that time, which remains the level until the next timestamp data point where the stage would change, etc.
Besides this metric, there will be other health related metrics I plan to capture that will model the data in a similar way. Only the starting time and the level at that time, which should remain the same until the next data point.
So that's the general plan. Now the problems...
I'm having trouble figuring out the best way. I think stepline would be the best chart type for this source data. I'm not expecting to be able to have the different stages have different colors. Just being able to see the height differences is sufficient.
But FusionTime doesn't show all of the data points and the ones it does show don't seem to be accurate. I'm blaming data binning.
As you can see the first point charted is on May 3rd, 12:24-12:26. But there are 5 data points from May 2nd that it just leaves off. I don't know why. And as you can see from comparing the two charts, the patterns don't match. For instance at 1am the Fusion chart says the level would be REM (3), but if you look at the Pillow chart, it would have to be either Deep (1) or Light (2). Looking at the data points in the database confirms that.
So it has to be the data binning aggregation that is changing the chart. I've tried every aggregation other than average and none of them makes a difference.
I'd like for the data to be 100% time accurate. I want to see every datapoint and not have the first ones disappear. If I mouse over 1am I should see the correct stage level for that time. As I zoom in or out, I'd like the columns to get more wide/narrow as appropriate, but the height should never be wrong. If I zoom too far out, I'd rather the data disappear than be wrong. I'd be fine to lock the zoom level if necessary, not that I know how to.
Is this possible with FusionCharts/FusionTime? Would there be a better chart type to accomplish what I'm trying to do? Is there a different charting software that would do this? I want to use FusionTime, because I want to have the multivariate charts to compare multiple metrics along the same timeline. And I do want to be able to zoom in and out because other metrics I'm tracking wouldn't be limited to this time frame. So I need to be able to zoom/scroll through the entire day.
-
Use an array as chart values
I need an array with chart values, I obtained one but after exiting from the function it became blank, here's what happens: Example
function AddvotoTec(votor) { class Avg { constructor() {} static average(votor) { var total = 0; var count = 0; jQuery.each(votor, function(index, value) { total += value; count++; }); return total / count; } } var mvoti = Avg.average(votor); var mvoti = Math.round((mvoti + Number.EPSILON) * 10) / 10; const myJSON = JSON.stringify(mvoti); voti(myJSON); } var allvoti = []; function voti(Voti) { allvoti.push(Voti); } const data = { labels: labels, datasets: [{ label: 'My First dataset', backgroundColor: [ 'rgb(255, 132, 0)' ], borderColor: 'rgb(255, 99, 132)', data: allvoti, }] };
The chart that I used is Chart.js.
-
Roadmap for PowerBI development
I have a task to visualize data from an API using PowerBI with periodic updates. What programs will be used in this chain, besides PowerBI? Do I need to use something specific or are there options? What knowledge do I need at each stage to implement this task?
I found that the data from the API needs to be transferred to the database, from which then to set up a connection to PowerBi, is this enough to start learning?
-
Can you use a variable to represent a slicer selection in PowerBi?
I am having a problem displaying a sum value in a gauge visual. My table has many rows with a value in each along with a date. I wrote a measure that calculates the sum of the values filtered by the type of product and whether it was sold during the day or night. The problem is there are many rows of values with the same date so when I put a date drop down slicer on the page, the measure doesn't return a value unless I make the date slicer a "range" which I don't want. I am assuming that the measure doesn't know which value to return when the slicer is in the drop down mode. How can I make this work? Can I use two variables in the DAX code for the measure that provide a date "range" based on the selection in the date drop down that the user chooses?? See below for my current code.
Table:
DATE | Product Sold | Day or Night -------------------------------------------------- 4/1/2022 1000 N 4/1/2022 500 D 4/1/2022 800 N 4/1/2022 2000 D 4/2/2022 900 N Measure = CALCULATE( SUM('Table'[Product Sold]), 'Table'[Day or Night] IN { "N" })
So the gauge visual won't display a value based on this measure when using a drop down date slicer. It should display 1,800 when the drop down date slicer has a date of 4/1/2022
The gauge visual WILL display the sum value when using a date range slicer but I can't use that type.
I hope this makes sense. There has to be a way around it to make it work. I'm at a loss.
-
Count occurances in multiple filtered rows
I need a little help since im new to PowerBI. I have a data set which says what have been eaten in a specific day. At the end there are columns which show if the day before the overall feeling was better (so in this specific day it got worse). I got up to 30 Ingredients and 5 days before. The "1" in e.g. Day2 means its TRUE for condition "2 days before it got worse"
The data looks like this: Data set example
Now, I want to retrieve and add up all ingredients, which has been eaten at "Day1", "Day2" and so on, so I can see which food is maybe causing problems because it should appear more often in the days before or at least appear in every case there. How do I achieve this?
For example I can see then, that on Day2 overy often Ingredient "Apple" appears, so there could be an assumption that Chicken meat is not good for this person.
I tried to pivot the table, as well as disconnect the "DayX" into another table and make relationship between them, but nothing adds up the things in the way I want it to.
-
CSS overflow property breaks my interactions with elements in chromium browsers
I don't know why but, when I add an overflow property to my div container, then each element inside is not interactable (it just happens on chromium browsers, in firefox works properly), I can't select any text, grab images, etc... It behaves like I would use
pointer-events: none;
but I didn't, I need a scrollable div, and I can not do this due to that bug. Can someone explain that? Is there my mistake or just a normal bug with chromium-browser? I tried some scrollbar libraries, but it doesn't work as well. I use thetranslateZ()
property and basically, it's a 3d cube in CSS, maybe the browser has a problem with 3d elements.I prepared some quick example, look at that cube's second face. There's a text it goes over an element, because the element has just 100vh of height, when I add overflow and want to do it scrollable it takes all interactivity even the dev highlight tool doesn't react with that. I assume it could be because the browser thinks that element is not here on Z-axis, but away from here.
const cube = document.querySelector(".cube"); const cnt = document.querySelector(".cnt"); const wrapper = document.querySelector(".wrapper"); document.addEventListener("wheel", e => { if (e.ctrlKey) return; if (e.deltaY > 0) { //scroll down cube.classList.add("rotated-down"); wrapper.classList.add("wrapper-rotated-down"); } else if (e.deltaY < 0) { //scroll up cube.classList.remove("rotated-down"); wrapper.classList.add("wrapper-rotated-up"); } else if (e.deltaX < 0) { //scroll up cube.classList.add("rotated-side"); } else if (e.deltaX > 0) { //scroll up cube.classList.remove("rotated-side"); } }); wrapper.ontransitionend = e => { if (wrapper.classList.contains("wrapper-rotated-down")) { wrapper.classList.remove("wrapper-rotated-down"); } else if (wrapper.classList.contains("wrapper-rotated-up")) { wrapper.classList.remove("wrapper-rotated-up"); } }; document.addEventListener("keydown", e => { if (e.key === "ArrowDown") { //scroll down cube.classList.add("rotated-down"); } else if (e.key === "ArrowUp") { //scroll up cube.classList.remove("rotated-down"); } else if (e.key === "ArrowLeft") { //scroll up cube.classList.add("rotated-side"); } else if (e.key === "ArrowRight") { //scroll up cube.classList.remove("rotated-side"); } });
@keyframes goAndCome { 0% { transform: scale(1); } 50% { transform: scale(0.5); } 100% { transform: scale(1); } } body { margin: 0; position: relative; width: 100vw; height: 100vh; background: #40a3ff; overflow: hidden; } .wrapper { transform: scale(1); } .wrapper-rotated-down { animation: goAndCome 0.7s 0s ease forwards; } .wrapper-rotated-up { animation: goAndCome 0.7s 0s ease forwards; } .cnt { perspective: 3000px; } .cube { position: relative; width: 100vw; height: 100vh; transform-style: preserve-3d; transform: translateZ(-50vh) rotateX(0) rotateY(0); transition: transform 0.5s 0s linear; box-shadow: inset 0 0 125px white; } .rotated-down { transform: translateZ(-50vh) rotateX(0.25turn); } .rotated-side { transform: translateZ(-50vh) rotateY(0.25turn); } .side { position: absolute; display: flex; align-items: flex-start; justify-content: center; width: 100vw; height: 100vh; opacity: 0.9; color: rgb(255, 0, 0); font-size: 2rem; } .side:hover::before { display: block; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); content: "Active"; font-size: 5rem; color: rgb(255 255 255); } .back { background: green; transform: rotateX(0) translateY(0) translateZ(50vh); } .bottom { overflow: auto; /* - takes all interactivity from element */ background: rgb(0, 66, 153); transform: rotateX(-90deg) rotateZ(0) translateY(0) translateZ(50vh); } .text { display: block; }
<div class="wrapper"> <div class="cnt"> <div class="cube"> <div class="side back"><span>Hello</span></div> <div class="side bottom"> <div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> <div>text</div> </div> </div> </div> </div> </div>
-
sapui5 Gantt chart table view remove scrollbar
My Gantt chart table view renders a weird horizontal scrollbar under the vertical scrollbar. I want to remove it because it looks weird. Does anybody have any advice ?
See the little gray dot in under the vertical scrollbar:
-
Need help using python to visualize flight duration over a 48 hour period based on a airport, aircraft, and departure/arrival time?
I want to create a dataviz that will look similar to a gantt chart, but instead of tracking my project I would like it to display a stacked horizontal bar graphs depicting flight duration, and are correlated to aircraft departing airports. You can refer to airgantt.com for a reference visual.
Below is some example data:
Airport Aircraft Departure DTG Arrival DTG SMF B737 4/29/22 23:00 4/30/22 02:00 SMF B707 4/30/22 01:00 4/30/22 05:00 SMF B787 4/30/22 07:45 4/30/22 13:00 DEN B737 4/30/22 06:30 4/30/22 10:00 Problems I am running into include:
- Which libraries to use (numpy, pandas, mathplot, etc)?
- How to deal with overlapping Date Time Groups (DTG). For Example, when I tried it in MS Excel, I was able to create a rudimentary gantt chart, but because flights were crossing over days (from 4/29 to 4/30) the bar graph would not render accurately.
-
Can I see both Month & Year in The Power BI Line chart X Axis?
whatever date range I select in the filter, only Month is showing in the X-Axis. But, I want to show both Month & Year (side by side) in the X-Axis whenever I use the Date filter. How I fix this issue?
-
Date Slicer to filter data from other table
I created Date table to get Date. I used Date table(Date) as Slicer to filter data from other table where data exists. Applied relation between Date table and other table where data exists. When I used date(date table) slicer to filter data from other table it is showing empty data. When I have taken Date slicer from table where data exists it showing data.
slicer should filter data with date from Date table.