GetDKAN / dkan

DKAN Open Data Portal
https://dkan.readthedocs.io/en/latest/index.html
GNU General Public License v2.0
367 stars 170 forks source link

X-Value Formats #1530

Closed ajacinto closed 6 years ago

ajacinto commented 7 years ago

Upon adding a chart, the X-format field doesn't appear to work. I'm attaching a screenshot of the values that get rendered on the chart.

x-value-formats

ajacinto commented 7 years ago

Here's another version where the x-value format doesn't appear to be influencing the chart. This keeps showing the percentage instead of the actual value.

pie-chart-sample

rhabbachi commented 7 years ago

Thanks @ajacinto for the bug report! Tracking this issue internally (ticket code CIVIC-5049). We are preparing a new release so looking into this issue can be delayed a bit but it's definitely on our radar now.

jvitello commented 7 years ago

@ajacinto

line charts

Looks like you are adjusting the X-axis formatting when you'll want to change the Y-axis formatting. It's working as expected on the current dev version of DKAN, but not sure which version you are using. I think the reason the X-axis wasn't updating with the format you chose was because it included text ("Q4 "), and there isn't a way to render that as a number.

pie charts

The pie charts aren't affected by the format changes. The percentages are shown on the chart, and the raw data is displayed on mouseover. It's poor UI to have the additional fields visible when they can't be used, but we haven't gotten far enough along to change the fields based on what kind of chart is selected. This is a back burner improvement at the moment, so I can't really say when this will be addressed in the future. One of our more immediate goals is to improve the public documentation for DKAN, so we'll try to make sure this is addressed there in the short term.

ajacinto commented 7 years ago

@jvitello

Thanks or the replies. I'm currently using DKAN (dkan-7.x-1.12.11) with Acquia. I tried what you suggested applying the formatting on the Y-axis and it produced the same results.

thousands-format

For the pie charts, we were hoping to display the breakdown of the figures that was already in the data instead of a calculated percentage that was being returned by DKAN. Since the respective amounts were already included per slice, wouldn't it be possible to just have a checkbox that allowed users to return the actual value instead of the calculated percentage for a bit more control?

jvitello commented 7 years ago

@ajacinto Can you link to the data? I'll give it a test and see if I can reproduce the issue.

re: Pie Charts: I'll add notes in the feature request, but it's really difficult to determine when it might be picked up for implementation. If you can find a developer, make a fix and submit a PR!

ajacinto commented 7 years ago

@jvitello - Thanks! Here's a link to the data. Looking forward to your feedback. http://adbdkan2kbpjq5ofre.devcloud.acquia-sites.com/sites/default/files/dkan-statistics_7.csv

Noted on the pie chart comments. For now, we just made changes to the default values of the nvd3 library. It's not much of a fix, but it works for now.

jvitello commented 7 years ago

I was able to recreate the formatting issue on 1.12.11. There seems to be some inconsistency on the development branch. We have a ticket in the queue. It will likely be fixed as part of DKAN 1.13, but I'm not sure if it will be fixed as a minor release to 1.12.x.

ajacinto commented 7 years ago

This appears partially fixed in 1.12. On mouseover, the y-value reflects the number format selected, but the shown value for the bar is unaffected. I've attached a screenshot for reference. chart-decimal-issue

stefaniefgray commented 6 years ago

This issue is still happening -- see https://github.com/GetDKAN/dkan/issues/2181

Katsivelisp commented 6 years ago

Hi,

I've been dealing with issue on 1.13 as well. A discrete bar chart displays numbers instead of regular labels, even though I have selected the X-axis format to be "String" and later on "Text".

Just to add though that this is an issue with Chrome. Firefox seems to display labels just fine. Can you reproduce this?

kimwdavidson commented 6 years ago

This ticket is a duplicate of another one in our backlog. We'll close this one and track this issue in #2181.