I want to create partial views such that each partial view corresponds with one type of chart (say bar chart, pie chart etc.). The chart should be generated on the partial view just by passing the model to it.
I am working on the charts for the first time so not very much aware of the components/libraries available. All the example I seem to find on internet works by creating all the charts at the time of requirement and saving the for further use. Eg. http://czetsuya-tech.blogspot.in/2012/02/how-to-render-chart-object-in-view-in.html#.Uk_r_oaGoUU
Please let me know if any clarification is required.
While searching for similar thing I found the following that I think could be helpful to you as well:
http://forums.asp.net/t/1874913.aspx
Related
I am creating a project where I need to create a view with search textboxes and a dropdown which would be populated from the server. Same view also have a grid which would be populated based on the search criteria enter/selected by user.
I want to know what would be the design of the page in terms of showing both on same page. Should I create a partial view for the grid or Search panel or add both in the single view?
Note that dropdown list would need to be populated from the ViewModel. So what is the common practice in the situation. I am new to this I have done few pages but with lot of code, session and ViewBags and I think I am not following recommended practice.
Actually, the design for your web application is according to your requirement.
For example, if you want grid to work with other datasource or view, you could build it as a component, then if you want to use it, you could directly use this component to avoid write the same codes for multiple time.
If you want to use same grid to show in some other page, you could build it a partial view, then you could directly call this view to show something.
I have used Charts library to make my chart. It really has ton of options, but I have been struggling to implement background for grid. I want to have gradient background, but just for grid part. I have done this by putting my view behind the chart view. I have printed _viewPortHandler.contentRect, and from there i positioned my view. Now, while this works, it is not most ideal solution. I would like to somehow at runtime have option to get gridview size, but since _viewPortHandler is internal, I see no option to do this:
Is there any better way to do this?
I am trying to pass data to my ng-bootstrap tooltip template. Following this example https://ng-bootstrap.github.io/#/components/tooltip/examples#tplwithcontext , I am now stuck at adding the #t1="ngbTooltip" part. Because my elements are created by iterating over an array, I cannot manually add the #t1 part.
This is my best try:
https://stackblitz.com/edit/ngbs-tooltip-dyn
When hovering over one of the "cell *" table cells, I want the tooltip to render the appropriate template with the cell's data from tooltipData.
Any considerations and help are appreciated.
Ok, so I have solved this, and posting this for reference.
The reason why I was struggling is that I was thinking that the content would be pulled dynamically. Opposed to that, the way it works is to render all the tooltips.
I have updated my Stackblitz https://stackblitz.com/edit/ngbs-tooltip-dyn for reference.
I'm currently working on a webapp project in Vaadin 10. On the main page there's an overview of your current chats. Each chat is displayed as a bubble looking like:
It contains an image and a label.
I placed the bubbles in a Grid to ensure fast loading and flexibility like this:
`Grid<VisualGroup> cloudGrid = new Grid<VisualGroup>();
cloudGrid.setWidth("100%");
cloudGrid.setHeight("100%");
cloudGrid.getElement().getStyle().set("border","white");
cloudGrid.addComponentColumn(VisualGroupComponent::new);
cloudGrid.setItems(groups);`
My problem is that the label does not wrap when I put the components in the grid. If I create the component independently the text wraps correctly like:
But if I use the grid like described above it looks:
Does anyone know how to get text wrapping working in ComponentColumns in Vaadin?
If anyone knows the exact attribute I need to overwrite to get just the wrapping working and not delete every thing else that would probably the best solution. But for now that is a workaround.
Is there a way to modify a Vaadin chart by moving a bar or a point from the chart itself? i.e. I have a bar chart with a certain value in one of the bars, I want to get a new value by dragging that bar to that new value.
There is something similar in this example, that is why I wonder if it is possible to extend this option to something like what I need.
Thanks!!!!
I assume that vaadin uses Highcharts if this is the case, maybe you can use plugins, if so I recommend:
http://www.highcharts.com/plugin-registry/single/3/Draggable%20Points
Source code in case you had to rewrite it:
https://rawgit.com/highslide-software/draggable-points/master/draggable-points.js
Regards.