Forum Discussion
shape map
Thanks Anonymous. I've also added Finland to my TopoJSON repository: https://github.com/deldersveld/topojson
Thanks a lot
I dowloaded finland-regions.json
but when I add this to power BI it gives me an unexpected error. Why could be this?
- deldersveld9 years ago
Resident Rockstar
Are you running the August 2016 version 2.38.4491.282? If so, can you post the text of the error detail? An earlier version of the Shape Map could not handle unicode characters and would give an error mentioning "btoa" conversion somewhere in the text. I tested it in the aforementioned version, and the regions map displays for me.
- amarcos9 years agoRegular Visitor
deldersveld I'm using version 2.38.4491.282 64-bit (August, 2016)
And this is the Error Message:
An error occurred while rendering the report.
Stack Trace:
Microsoft.Mashup.Host.Document.JavaScriptException: An error occurred while rendering the report.
Error: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
at Error (native)
at saveSliceToDefinition (ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:7606:77)
at Object.saveChangedSliceToDefinition [as save] (ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:7632:25)
at ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:6874:113
at UndoRedoService.register (ms-pbi://pbi.microsoft.com/minerva/scripts/explore.js:6000:159)
at PropertyPaneController.save (ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:6873:93)
at fn (eval at <anonymous> (ms-pbi://pbi.microsoft.com/minerva/scripts/angular.js:1:0), <anonymous>:4:382)
at PropertyCardController.destination.(anonymous function) [as cardChanged] (ms-pbi://pbi.microsoft.com/minerva/scripts/angular.js:9739:22)
at PropertyCardController.sliceChanged (ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:6799:26)
at fn (eval at <anonymous> (ms-pbi://pbi.microsoft.com/minerva/scripts/angular.js:1:0), <anonymous>:4:323)Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.ClientShared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace)
at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass3.<SendAndMarshalExceptions>b__0(Object null)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClassb.<Main>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)
JS Error Message
Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.Recent Actions
SavePropertyPane, SavePropertyPane, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, SavePropertyPane, SavePropertyPane, SavePropertyPane, SavePropertyPaneActive Section Contract
{"name":"ReportSection3","displayName":"Finland","ordinal":3,"visualContainers":[{"x":0,"y":89.32593180015861,"z":1,"width":421.25297383029346,"height":297.4147501982554,"config":"{\"layouts\":[{\"id\":0,\"position\":{\"x\":0,\"y\":89.32593180015861,\"z\":1,\"width\":421.25297383029346,\"height\":297.4147501982554}}],\"singleVisual\":{\"visualType\":\"barChart\",\"projections\":{\"Category\":[{\"queryRef\":\"Finland.State / Province\",\"active\":true}],\"Y\":[{\"queryRef\":\"Sum(Finland.SEEs)\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"f\",\"Entity\":\"Finland\"}],\"Select\":[{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"State / Province\"},\"Name\":\"Finland.State / Province\"},{\"Aggregation\":{\"Expression\":{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"SEEs\"}},\"Function\":0},\"Name\":\"Sum(Finland.SEEs)\"}]}},\"name\":\"VisualContainer\"}"},{"x":0,"y":414.4647105471848,"z":2,"width":367.45440126883426,"height":303.50515463917526,"config":"{\"layouts\":[{\"id\":0,\"position\":{\"x\":0,\"y\":414.4647105471848,\"z\":2,\"width\":367.45440126883426,\"height\":303.50515463917526}}],\"singleVisual\":{\"visualType\":\"filledMap\",\"projections\":{\"Category\":[{\"queryRef\":\"Finland.State / Province\",\"active\":true}],\"Size\":[{\"queryRef\":\"Sum(Finland.SEEs)\"}],\"Series\":[{\"queryRef\":\"Finland.code\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"f\",\"Entity\":\"Finland\"}],\"Select\":[{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"State / Province\"},\"Name\":\"Finland.State / Province\"},{\"Aggregation\":{\"Expression\":{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"SEEs\"}},\"Function\":0},\"Name\":\"Sum(Finland.SEEs)\"},{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"code\"},\"Name\":\"Finland.code\"}]},\"objects\":{\"dataPoint\":[{\"properties\":{\"fillRule\":{\"linearGradient2\":{\"max\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#01B8AA'\"}}}},\"min\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#ccf1ee'\"}}}}}}}}]}},\"name\":\"VisualContainer1\"}"},{"x":412.1173671689136,"y":46.693100713719275,"z":3,"width":812.0539254559874,"height":647.6130055511499,"config":"{\"layouts\":[{\"id\":0,\"position\":{\"x\":412.1173671689136,\"y\":46.693100713719275,\"z\":3,\"width\":812.0539254559874,\"height\":647.6130055511499}}],\"singleVisual\":{\"visualType\":\"shapeMap\",\"projections\":{\"Value\":[{\"queryRef\":\"Sum(Finland.SEEs)\"}],\"Category\":[{\"queryRef\":\"Finland.code\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"f\",\"Entity\":\"Finland\"}],\"Select\":[{\"Aggregation\":{\"Expression\":{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"SEEs\"}},\"Function\":0},\"Name\":\"Sum(Finland.SEEs)\"},{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"code\"},\"Name\":\"Finland.code\"}]},\"objects\":{\"dataPoint\":[{\"properties\":{\"fillRule\":{\"linearGradient2\":{\"max\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#01B8AA'\"}}}},\"min\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#ccf1ee'\"}}}}}}}}],\"shape\":[{\"properties\":{\"map\":{\"geoJson\":{\"type\":{\"expr\":{\"Literal\":{\"Value\":\"'shared'\"}}},\"name\":{\"expr\":{\"Literal\":{\"Value\":\"'usa.states.topo'\"}}},\"content\":{\"expr\":{\"ResourcePackageItem\":{\"PackageName\":\"ShapeMap\",\"PackageType\":2,\"ItemName\":\"usa.states.topo\"}}}}},\"projectionEnum\":{\"expr\":{\"Literal\":{\"Value\":\"'albersUsa'\"}}}}}]}},\"name\":\"VisualContainer2\"}","popOutMode":0}],"displayOption":1,"width":1280,"height":720,"config":"{}"}- deldersveld9 years ago
Resident Rockstar
Can you post a PBIX or a dataset? I see the "btoa" encoding error in your message.