A solution is there, but it's a Custom Code Solution.
Let me first explain what happened, and what will happen in future:
Firstly, a View is not intended to provide DATA to USE, but to DISPLAY it.
(USE of data is the purpose of an API function.)
We have also many new features with the new View.
Like endless scroll, etc.
Also, many future features required us to actually wrap the Views Loop into default HTML -
This being said, we changed how Views Loops are outputted.
This in order for new features to work properly.
This will not change in future.
We need those wrappers as example if you have pagination. It is also needed if you use parametric search. And it will also be mandtory when we add custom frontend sorting controls (future).
So we would need to detect this on a per View basis, counting on settings stored within the View and also some shortcodes that could appear everywhere, even on Content Templates that we can not scan.
I assume you see the complexity of the scans that would be needed to make, in order to dynamically enable or disable Default HTML wrapping.
But now to the solution, I just tested it.
1. Download and install the new Views 1.11
2. Construct a View that displays all results, query some post, output (for now) one post only
3. The View Loop holds as less data as possible.
My test View, copy and paste exactly as is:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start --><wpv-loop>[wpv-noautop]1,2,3,4,5[/wpv-noautop]</wpv-loop><!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
4. Get your Views ID (URL of Edit View Page)
5. Put this to your functions.php and change the ID:
add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_clean_view_output', 5, 2 );
function prefix_clean_view_output( $out, $id ) {
if ( $id == 'ID' ) {
$start = strpos( $out, '<!-- wpv-loop-start -->' );
if (
$start !== false
&& strrpos( $out, '<!-- wpv-loop-end -->', $start ) !== false
) {
$start = $start + strlen( '<!-- wpv-loop-start -->' );
$out = substr( $out , $start );
$end = strrpos( $out, '<!-- wpv-loop-end -->' );
$out = substr( $out, 0, $end );
}
}
return $out;
}
6. In a page, use the view in this (your plugins) shortcode:
[wp_charts title="linechart" type="line" align="alignright" margin="5px 20px" datasets="[wpv-view name='raw'] next 1,2,3,4" labels="one,two,three,four" scaleoverride="true" scalesteps="5" scalestepwidth="10" scalestartvalue="0"]
// of course, you can also replace the numbers after "next" with the view
This actually displays what you see in my screenshot.
Notice that, with this applied to a given View ID:
- Pagination, specially AJAX pagination, will not work.
- Parametric search, specially AJAXed parametric search, will not work.
- Other future features will not work either.
I explained the "why's" above.
Views was (and is) not intended as a Data Provider, but a Data Display engine.
With all new features, and features to come, this default HTML will now be attached all the times to a Views Loop, unless you use above workarounds and approaches.
I hope you can now proceed with your project.
Thank you very much for your patience.