When I try to create a histogram, Kibana displays only rounded numbers. For instance, for the current parameter, instead of displaying 0.5, it displays 0, and instead of 5.4, it displays 5. Here is an example:
the chart should indeed show the unrounded values. A possible cause is that the "Current" field is defined as a non-floating point type in the mapping of your index. Discover shows the raw values passed to Elasticsearch during ingestion, but the visualization is using aggregations which is working with the indexed values.
Could you run GET /simple_table_1_7/_mapping in the dev tools console and paste the result here to check whether that's the cause? If it is, you have to change the mapping to a floating point number and re-index your data.
So my voltage was a double and current was integer - it should be reversed. Have to be more careful. I tried running with these switched, and it now works. For reference, here is the code I am using:
from elasticsearch_dsl import Document, Date, Integer, Text, Double
from elasticsearch_dsl.connections import connections
from elasticsearch.helpers import bulk
import csv
connections.create_connection(hosts=["localhost"])
class WordCloud(Document):
Timestamp_from_excel = Date()
Voltage = Integer()
Current = Double()
class Index:
name = "simple_table_1_7"
doc_type = "my_type"
WordCloud.init()
with open('Path\\to\\your\\csv\\.csv') as f:
reader = csv.DictReader(f)
bulk(
connections.get_connection(),
(WordCloud(**row).to_dict(True) for row in reader)
)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.