why stimulsoft reports js clustered chart y axis format not getting set - stimulsoft

hi i am new to stimulsoft, i am using stimulsoft report js to generate a report, but i am not able to set my Y-axis format.
i tried using N2 but instead of showing numbers in y-axis its starts showing N2. One more problem is that data on each bar is showing some random numbers though in tool tip its showing correct value of each bar.
My JSON data is something like this and in stimulsoft i made a relationship between marks and studdet inside marks.
[{
"studdet":[
{"Admnno":"18","stdnm":"NIKITA BERA","fname":"NIRMAL BERA","mname":"CHINU BERA","add":"JAMSHEDPUR ","cls":"I","sec":"A","roll":"9","dob":"2019-04-16","session":"2019","attworking":"0","attpresent":"0"},
{"Admnno":"63","stdnm":"ANIMESH KUMAR PRASWANI","fname":"PRADUMAN PASWAN","mname":"SUNILA DEVI","add":"JAMSHEDPUR ","cls":"I","sec":"A","roll":"10","dob":"2019-04-16","session":"2019","attworking":"0","attpresent":"0"},
{"Admnno":"33","stdnm":"VISHAL KUMAR","fname":"DILIP KUMAR","mname":"SUMAN DEVI","add":"JAMSHEDPUR ","cls":"I","sec":"A","roll":"11","dob":"2019-04-16","session":"2019","attworking":"0","attpresent":"0"},
{"Admnno":"54","stdnm":"ANIKET PANDEY","fname":"NAND KUMAR PANDEY","mname":"NITU DEVI PANDEY","add":"JAMSHEDPUR ","cls":"I","sec":"A","roll":"12","dob":"2019-04-16","session":"2019","attworking":"0","attpresent":"0"},
{"Admnno":"9","stdnm":"NIGAM KUMAR","fname":"BRIJESH KUMAR RAY","mname":"PAMMY DEVI","add":"JAMSHEDPUR ","cls":"I","sec":"A","roll":"13","dob":"2019-04-16","session":"2019","attworking":"0","attpresent":"0"},
{"Admnno":"55","stdnm":"RAJ KUMAR","fname":"RAGHVENDRA PRASAD","mname":"SANJU DEVI","add":"JAMSHEDPUR ","cls":"I","sec":"A","roll":"14","dob":"2019-04-16","session":"2019","attworking":"0","attpresent":"0"},
{"Admnno":"23","stdnm":"SHUBHAM DEY","fname":"DIPAK DEY","mname":"PUMPA DEY","add":"JAMSHEDPUR ","cls":"I","sec":"A","roll":"15","dob":"2019-04-16","session":"2019","attworking":"0","attpresent":"0"},
{"Admnno":"34","stdnm":"JIBESH GHOSH","fname":"SUSHANTA KUMAR GHOSH","mname":"LATIKA GHOSH","add":"JAMSHEDPUR ","cls":"I","sec":"A","roll":"16","dob":"2019-04-16","session":"2019","attworking":"0","attpresent":"0"},
{"Admnno":"45","stdnm":"SHRUTI AGARWAL","fname":"SANJAY KUMAR AGARWAL","mname":"SIMA DEVI","add":"JAMSHEDPUR ","cls":"I","sec":"A","roll":"17","dob":"2019-04-16","session":"2019","attworking":"0","attpresent":"0"},
],
"marks":[
{"fullPt1":20,"marksObtPt1":10,"wtPt1":10,"fullMarksPt1":20,"UT1":5,"examNamePt1":"ut1","fullCt1":10,"marksObtCt1":10,"wtCt1":10,"fullMarksCt1":10,"calculatedCt1":10,"examNameCt1":"ct1","fullPt3":10,"marksObtPt3":5,"wtPt3":10,"fullMarksPt3":10,"calculatedPt3":5,"examNamePt3":"pt3","fullUt2":0,"marksObtUt2":0,"wtUt2":0,"fullMarksUt2":0,"calculatedUt2":0,"examNameUt2":0,"fullCt2":0,"marksObtCt2":0,"wtCt2":0,"fullMarksCt2":0,"calculatedCt2":0,"examNameCt2":0,"fullPt6":0,"marksObtPt6":0,"wtPt6":0,"fullMarksPt6":0,"calculatedPt6":0,"examNamePt6":0,"fullNb1":5,"marksObtNb1":2,"wtNb1":5,"fullMarksNb1":5,"nb":2,"examNameNb1":"nb1","fullSe1":5,"marksObtSe1":3,"wtSe1":5,"fullMarksSe1":5,"se":3,"examNameSe1":"se1","fullHf":80,"marksObtHf":10,"wtHf":80,"fullMarksHf":80,"hf":10,"examNameHf":"hf","fullPortf":5,"marksObtPortf":1,"wtPortf":10,"fullMarksPortf":5,"calculatedPortf":2,"examNamePortf":"PORTF1","subjectCodeCom":"1","PaperName":"Mathematics","Admnno":"18","typeCom":"Main","selectedCom":true,"total":32,"examName":"Periodic Test (10)","highestMarks":"80","grade":"E","attworking":"0","attpresent":"0"},
{"fullPt1":20,"marksObtPt1":10,"wtPt1":10,"fullMarksPt1":20,"UT1":5,"examNamePt1":"ut1","fullCt1":10,"marksObtCt1":5,"wtCt1":10,"fullMarksCt1":10,"calculatedCt1":5,"examNameCt1":"ct1","fullPt3":10,"marksObtPt3":5,"wtPt3":10,"fullMarksPt3":10,"calculatedPt3":5,"examNamePt3":"pt3","fullUt2":0,"marksObtUt2":0,"wtUt2":0,"fullMarksUt2":0,"calculatedUt2":0,"examNameUt2":0,"fullCt2":0,"marksObtCt2":0,"wtCt2":0,"fullMarksCt2":0,"calculatedCt2":0,"examNameCt2":0,"fullPt6":0,"marksObtPt6":0,"wtPt6":0,"fullMarksPt6":0,"calculatedPt6":0,"examNamePt6":0,"fullNb1":5,"marksObtNb1":2,"wtNb1":5,"fullMarksNb1":5,"nb":2,"examNameNb1":"nb1","fullSe1":5,"marksObtSe1":3,"wtSe1":5,"fullMarksSe1":5,"se":3,"examNameSe1":"se1","fullHf":80,"marksObtHf":5,"wtHf":80,"fullMarksHf":80,"hf":5,"examNameHf":"hf","fullPortf":5,"marksObtPortf":1,"wtPortf":10,"fullMarksPortf":5,"calculatedPortf":2,"examNamePortf":"PORTF1","subjectCodeCom":"2","PaperName":"English","Admnno":"18","typeCom":"Main","selectedCom":true,"total":22,"examName":"Periodic Test (10)","highestMarks":"80","grade":"E","attworking":"0","attpresent":"0"},
{"fullPt1":20,"marksObtPt1":10,"wtPt1":10,"fullMarksPt1":20,"UT1":5,"examNamePt1":"ut1","fullCt1":10,"marksObtCt1":5,"wtCt1":10,"fullMarksCt1":10,"calculatedCt1":5,"examNameCt1":"ct1","fullPt3":10,"marksObtPt3":5,"wtPt3":10,"fullMarksPt3":10,"calculatedPt3":5,"examNamePt3":"pt3","fullUt2":0,"marksObtUt2":0,"wtUt2":0,"fullMarksUt2":0,"calculatedUt2":0,"examNameUt2":0,"fullCt2":0,"marksObtCt2":0,"wtCt2":0,"fullMarksCt2":0,"calculatedCt2":0,"examNameCt2":0,"fullPt6":0,"marksObtPt6":0,"wtPt6":0,"fullMarksPt6":0,"calculatedPt6":0,"examNamePt6":0,"fullNb1":5,"marksObtNb1":2,"wtNb1":5,"fullMarksNb1":5,"nb":2,"examNameNb1":"nb1","fullSe1":5,"marksObtSe1":3,"wtSe1":5,"fullMarksSe1":5,"se":3,"examNameSe1":"se1","fullHf":80,"marksObtHf":6,"wtHf":80,"fullMarksHf":80,"hf":6,"examNameHf":"hf","fullPortf":5,"marksObtPortf":1,"wtPortf":10,"fullMarksPortf":5,"calculatedPortf":2,"examNamePortf":"PORTF1","subjectCodeCom":"3","PaperName":"Hindi","Admnno":"18","typeCom":"Main","selectedCom":true,"total":23,"examName":"Periodic Test (10)","highestMarks":"80","grade":"E","attworking":"0","attpresent":"0"},
{"fullPt1":20,"marksObtPt1":10,"wtPt1":10,"fullMarksPt1":20,"UT1":5,"examNamePt1":"ut1","fullCt1":10,"marksObtCt1":5,"wtCt1":10,"fullMarksCt1":10,"calculatedCt1":5,"examNameCt1":"ct1","fullPt3":10,"marksObtPt3":5,"wtPt3":10,"fullMarksPt3":10,"calculatedPt3":5,"examNamePt3":"pt3","fullUt2":0,"marksObtUt2":0,"wtUt2":0,"fullMarksUt2":0,"calculatedUt2":0,"examNameUt2":0,"fullCt2":0,"marksObtCt2":0,"wtCt2":0,"fullMarksCt2":0,"calculatedCt2":0,"examNameCt2":0,"fullPt6":0,"marksObtPt6":0,"wtPt6":0,"fullMarksPt6":0,"calculatedPt6":0,"examNamePt6":0,"fullNb1":5,"marksObtNb1":2,"wtNb1":5,"fullMarksNb1":5,"nb":2,"examNameNb1":"nb1","fullSe1":5,"marksObtSe1":3,"wtSe1":5,"fullMarksSe1":5,"se":3,"examNameSe1":"se1","fullHf":80,"marksObtHf":9,"wtHf":80,"fullMarksHf":80,"hf":9,"examNameHf":"hf","fullPortf":5,"marksObtPortf":1,"wtPortf":10,"fullMarksPortf":5,"calculatedPortf":2,"examNamePortf":"PORTF1","subjectCodeCom":"4","PaperName":"Physics","Admnno":"18","typeCom":"Main","selectedCom":true,"total":26,"examName":"Periodic Test (10)","highestMarks":"80","grade":"E","attworking":"0","attpresent":"0"},],}]

i was using older version of stimulsoft which was 2018.3.3 and when i updated my version to 2019.3.4 my problem was resolved

Related

Getting rid of print "<IPython.core.display.Markdown object>" when using `display`

I'm trying to create nice slides using jupyter notebook and RISE. One of my objectives is to display a pandas-dataframe in a Markdown cell in order to have some styling flexibility.
I am using the following code to display my dataframe in a Markdown cell:
{{Markdown(display(df_x))}}
After running this line, I get the following result:
image of dataframe displayed
I would like to get rid of the text printed below my dataframe (<IPython.core.display.Markdown object>).
I still haven't found a way to achieve this. Could someone give me a hand?
This is the library I'm working with:
from IPython.display import display
Not familiar with Markdown class so not sure why you need that but this text printed in the output cell is coming from the fact that this Markdown class is returning and object and since you're not assigning it to any variable the default behavior for the notebook is to run something like str(your_object) which correctly returns <IPython.core.display.Markdown object>.
So the easiest workaround would be to just assign it to some variable like this:
dummy_var = Markdown(display(df_x))
# or better yet:
_ = Markdown(display(df_x))

GeoJSON file not being rendered using Folium

I am trying to create a choropleth map using Folium. I exported a GeoJSON file for London boroughs from an official GIS shapefile. After hours of researching about possible causes, I noticed in my file that the features come up in a different order compared to another GeoJSON file that works, which I assume is the reason for not appearing on the map. Basically the order in mine is something like
"features": [
"geometry": {...},
"properties": {...}, etc
and the working GeoJSON has
"features": [
"properties": {...},
"geometry": {...},
My question is How can I change the order of the features or how to make it render with Folium?
The code for creating the map is as follows:
london = r'london_simple.json' # geojson file
# create a plain London map
london_map = folium.Map(location=[51.5074, 0.1278], zoom_start=10)
london_map.choropleth(
geo_data = london,
data = dfl1,
columns = ['Area_name', 'GLA_Population_Estimate_2017'],
key_on='feature.properties.Counties_1',
fill_color = 'YlOrRd',
fill_opacity = 0.7,
line_opacity=0.2,
legend_name='Population size in London'
)
london_map
I'm working in a jupyter notebook on IBM Watson, if that makes any difference. If I use my geojson file, no choropleth regions appear. If I change to the other file, it works (provided I change the map coordinates to Toronto ([37.7749, -122.4194]).
My code doesn't generate any error, just the plain map focused on London without the choropleth regions.
Link to working geojson
Link to my problematic geojson
Have you tried this instead?
key_on='feature.properties.Counties_a'
I think the code beginning with E should identify the relevant part of the shapefile.
There seem to be a few problems with the JSON file for London-
The coordinate values are faulty. They contain values such as [532946.0999999996, 181894.90000000037] when in reality it should be something like [ -0.042770, 51.531530 ].
There seem to be very few values to draw a polygon of the counties.
Search for an alternative Geojson for London, I found a working one here

Databricks - CSV not loading properly

I have a simple csv file that's pipe delimited that I can load into Databricks, then disuplay the df and it displays nicely. I then try with my main dataset which is formatted the same way and an export from SQL server. After it loads the output shows that it was loaded (lists the field names and the data type it inferred -- all string though which isn't a good sign)
df = spark.read.format("csv").options(header='true', quote='"', delimiter="|",ignoreLeadingWhiteSpace='true',inferSchema='true').load("/mnt/gl/mainfile.csv")
Then I do display (df) and I don't see a nice display. Instead it shows the following:
Job 34 View
(Stages: 1/1)
Job 35 View
(Stages: 1/1)
Job 36 View
(Stages: 1/1)
Obviously the csv is at fault here but I've no idea how to go about solving this - I've already been careful with how I export it from SQL server so not sure what I'd do differently there.
Ok I solved it. If you get a similar issue it might mean your csv is not formatted properly. Open up your cv using a text editor like Ron's Editor then visually inspect the data. On my dataset for some reason the final field which is a $ amount, had a " in front of it , but not at the end of it.
e.g. "12344.67
Not sure why SQL Server would do that (I was using Import/Export Wizard) but I got rid of the " delimiter from my exported csv and it now works fine

Write png graph file from Stata to Excel

I'd like to create graphs in Stata and to export the underlying graph data (not the raw data from which they were produced) to Excel, altogether with the graph file. I think I stick to the official code documentation on putexcel by StataCorp (http://www.stata.com/manuals14/pputexcel.pdf), but I keep getting the following error message:
picture: expression must be enclosed in ()
When I enclose the relevant code line in parentheses I get the error
unknown function picture()
Any advice or hint on that? See below for a ready-to-run code sample.
sysuse auto, clear
* ------ place for some data manipulations (snip) -----------
tempfile data
save `data'
* plotting
graph bar price foreign
graph export "test.png", replace
* Export plot data (works only w/o by-option in graph command)
serset use
export excel "graphdata.xlsx", sheet("test") firstrow(variables) sheetreplace
putexcel H20 = picture(test.png) using "graphdata.xlsx", sheet("test") modify
serset clear
* re-use original data and plot next graph
use `data', clear
*...
Does this do what you want:
sysuse auto
export excel using "myresults.xlsx", replace sheet("Data")
graph bar price foreign
graph export "test.png", replace
putexcel set "myresults.xlsx", sheet("Graph") modify
putexcel A1 = picture(test.png)
OK, problem solved thanks to a hint by the Stata staff. For the records, it was an issue of which version of Stata's putexcel should be used (I didn't use the latest version -- sorry for having you bothered with my self-made problem). Now I'm going for putexcel version 2.1.1, 12aug2016 and the below code does perfectly what it is meant to do (you can find out your version of putexcel with which putexcel):
sysuse auto, clear
* ------ place for some data manipulations (snip) -----------
tempfile data
save `data'
* plotting
graph bar price foreign
graph export "test.png", replace
* Export plot data (works only w/o by-option in graph command)
serset use
export excel "graphdata.xlsx", sheet("test") firstrow(variables) sheetreplace
putexcel set "graphdata.xlsx", sheet("test") modify
putexcel H20 = picture(test.png)
serset clear
* re-use original data and plot next graph
use `data', clear
*...

Basic importing coordinates into R and setting projection

Ok, I am trying to upload a .csv file, get it into a spatial points data frame and set the projection system to WGS 84. I then want to determine the distance between each point This is what I have come up with but I
cluster<-read.csv(file = "cluster.csv", stringsAsFactors=FALSE)
coordinates(cluster)<- ~Latitude+Longitude
cluster<-CRS("+proj=longlat +datum=WGS84")
d<-dist2Line(cluster)
This returns an error that says
Error in .pointsToMatrix(p) :
points should be vectors of length 2, matrices with 2 columns, or inheriting from a SpatialPoints* object
But this isn't working and I will be honest that I don't fully comprehend importing and manipulating spatial data in R. Any help would be great. Thanks
I was able to determine the issue I was running into. With WGS 84, the longitude comes before the latitude. This is just backwards from how all the GPS data I download is formatted (e.g. lat-long). Hope this helps anyone else who runs into this issue!
thus the code should have been
cluster<-read.csv(file = "cluster.csv", stringsAsFactors=FALSE)
coordinates(cluster)<- ~Longitude+Latitude
cluster<-CRS("+proj=longlat +datum=WGS84")

Resources